Search in sources :

Example 1 with ProcessScopedMessageBean

use of org.camunda.bpm.engine.cdi.test.impl.beans.ProcessScopedMessageBean in project camunda-bpm-platform by camunda.

the class ThreadContextAssociationTest method testBusinessProcessScopedWithJobExecutor.

@Test
@Deployment
public void testBusinessProcessScopedWithJobExecutor() throws InterruptedException {
    String pid = runtimeService.startProcessInstanceByKey("processkey").getId();
    waitForJobExecutorToProcessAllJobs(5000l, 25l);
    assertNull(managementService.createJobQuery().singleResult());
    ProcessScopedMessageBean messageBean = (ProcessScopedMessageBean) runtimeService.getVariable(pid, "processScopedMessageBean");
    assertEquals("test", messageBean.getMessage());
    runtimeService.signal(pid);
}
Also used : ProcessScopedMessageBean(org.camunda.bpm.engine.cdi.test.impl.beans.ProcessScopedMessageBean) Test(org.junit.Test) Deployment(org.camunda.bpm.engine.test.Deployment)

Aggregations

ProcessScopedMessageBean (org.camunda.bpm.engine.cdi.test.impl.beans.ProcessScopedMessageBean)1 Deployment (org.camunda.bpm.engine.test.Deployment)1 Test (org.junit.Test)1