use of org.jbpm.process.workitem.bpmn2.ServiceTaskHandler in project jbpm by kiegroup.
the class AsyncThreadIsolationTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
executorService = ExecutorServiceFactory.newExecutorService(getEmf());
executorService.setInterval(1);
executorService.init();
addEnvironmentEntry("ExecutorService", executorService);
addWorkItemHandler("Service Task", new ServiceTaskHandler());
addProcessEventListener(new DefaultProcessEventListener() {
@Override
public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) {
if (event.getNodeInstance().getNodeName().equals("Async Hello Service Exception")) {
if (firstAttempt) {
firstAttempt = false;
} else {
synchronized (LOCK) {
LOCK.notifyAll();
}
}
}
}
});
}
Aggregations