use of org.jbpm.test.wih.FirstErrorWorkItemHandler in project jbpm by kiegroup.
the class AsyncEndSignalTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
executorService = ExecutorServiceFactory.newExecutorService(getEmf());
executorService.setInterval(1);
executorService.init();
addEnvironmentEntry("ExecutorService", executorService);
addWorkItemHandler("SyncError", new FirstErrorWorkItemHandler());
addProcessEventListener(new DefaultProcessEventListener() {
@Override
public void afterProcessCompleted(ProcessCompletedEvent event) {
synchronized (LOCK) {
LOCK.notifyAll();
}
}
});
}
use of org.jbpm.test.wih.FirstErrorWorkItemHandler in project jbpm by kiegroup.
the class AsyncIntermediateCatchSignalTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
executorService = ExecutorServiceFactory.newExecutorService(getEmf());
executorService.setInterval(0);
executorService.setThreadPoolSize(3);
addEnvironmentEntry("ExecutorService", executorService);
addWorkItemHandler("SyncError", new FirstErrorWorkItemHandler());
addProcessEventListener(new DefaultProcessEventListener() {
@Override
public void afterProcessCompleted(ProcessCompletedEvent event) {
latch.countDown();
}
});
executorService.init();
}
use of org.jbpm.test.wih.FirstErrorWorkItemHandler in project jbpm by kiegroup.
the class AsyncNodesWithoutExecutionServiceTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
addWorkItemHandler("SyncError", new FirstErrorWorkItemHandler());
}
use of org.jbpm.test.wih.FirstErrorWorkItemHandler in project jbpm by kiegroup.
the class AsyncThreadContinuationTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
executorService = ExecutorServiceFactory.newExecutorService(getEmf());
executorService.setInterval(1);
executorService.init();
addEnvironmentEntry("ExecutorService", executorService);
addWorkItemHandler("SyncError", new FirstErrorWorkItemHandler());
addProcessEventListener(new DefaultProcessEventListener() {
@Override
public void afterProcessCompleted(ProcessCompletedEvent event) {
System.out.println(event.getProcessInstance().getProcessId());
if (event.getProcessInstance().getProcessId().equals(PROCESS_ATC)) {
synchronized (LOCK_ATC) {
LOCK_ATC.notifyAll();
}
} else if (event.getProcessInstance().getProcessId().equals(PROCESS_IT)) {
synchronized (LOCK_IT) {
LOCK_IT.notifyAll();
}
}
}
});
}
use of org.jbpm.test.wih.FirstErrorWorkItemHandler in project jbpm by kiegroup.
the class AsyncThrowSignalTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
executorService = ExecutorServiceFactory.newExecutorService(getEmf());
executorService.setInterval(1);
executorService.init();
addEnvironmentEntry("ExecutorService", executorService);
addWorkItemHandler("SyncError", new FirstErrorWorkItemHandler());
addProcessEventListener(new DefaultProcessEventListener() {
@Override
public void afterProcessCompleted(ProcessCompletedEvent event) {
synchronized (LOCK) {
LOCK.notifyAll();
}
}
});
}
Aggregations