use of org.camunda.bpm.engine.cdi.annotation.ExecutionIdLiteral in project camunda-bpm-platform by camunda.
the class ExecutionIdTest method testExecutionIdInjectableByQualifier.
@Test
@Deployment
public void testExecutionIdInjectableByQualifier() {
getBeanInstance(BusinessProcess.class).startProcessByKey("keyOfTheProcess");
Set<Bean<?>> beans = beanManager.getBeans(String.class, new ExecutionIdLiteral());
Bean<String> bean = (Bean<java.lang.String>) beanManager.resolve(beans);
CreationalContext<String> ctx = beanManager.createCreationalContext(bean);
String executionId = (String) beanManager.getReference(bean, String.class, ctx);
Assert.assertNotNull(executionId);
String processInstanceId = (String) getBeanInstance("processInstanceId");
Assert.assertNotNull(processInstanceId);
assertEquals(processInstanceId, executionId);
}
Aggregations