use of org.jbpm.services.cdi.test.TestIdentifyProviderCDI in project jbpm by kiegroup.
the class HumanResourcesHiringTest method simpleExecutionTest.
@Test
public void simpleExecutionTest() {
assertNotNull(managerFactory);
String id = "custom-manager";
AbstractAuditLogger auditLogger = AuditLoggerFactory.newJPAInstance();
ServicesAwareAuditEventBuilder auditEventBuilder = new ServicesAwareAuditEventBuilder();
auditEventBuilder.setIdentityProvider(new TestIdentifyProviderCDI());
auditEventBuilder.setDeploymentUnitId(id);
auditLogger.setBuilder(auditEventBuilder);
RuntimeEnvironmentBuilder builder = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder().entityManagerFactory(emf).registerableItemsFactory(InjectableRegisterableItemsFactory.getFactory(beanManager, auditLogger));
builder.addAsset(ResourceFactory.newClassPathResource("repo/processes/hr/hiring.bpmn2"), ResourceType.BPMN2);
RuntimeManager manager = managerFactory.newSingletonRuntimeManager(builder.get(), id);
testHiringProcess(manager, EmptyContext.get());
manager.close();
}
Aggregations