AbstractPlatformTransactionManager aptm = (AbstractPlatformTransactionManager) context.getBean( "jbpmTxManager" );
Properties auth = new Properties();
auth.setProperty("max", "Standard");
UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(auth);
RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault()
.entityManagerFactory(emf)
.userGroupCallback(userGroupCallback)
.addAsset(ResourceFactory.newClassPathResource("jbpm/processes/sample1.bpmn2"), ResourceType.BPMN2)