Hello,
I know usually a signal is invoked upon the knowledgeSession, and all processInstances that are registered on this session and listen to the messageType, will be notified. E.g.
ksession.signalEvent("Message-StartProcessMessage", params);
However, how can I signal a specific process instance from within a work Item?
I know how to get to the ProcessInstanceId, but how would I have to go on?
public class CustomerServiceTaskHandler implements WorkItemHandler {
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
System.out.println(workItem.getProcessInstanceId());
try{
...
}catch(Exception ex){
myProcessInstance.signal('AbortTheCurrentInstance');
}
}
public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
}
}
Best regards,
Tobias