|
|
@ -118,6 +118,7 @@ public class EventExecuteService extends Thread { |
|
|
|
for (WorkflowExecuteThread workflowExecuteThread : this.processInstanceExecCacheManager.getAll()) { |
|
|
|
for (WorkflowExecuteThread workflowExecuteThread : this.processInstanceExecCacheManager.getAll()) { |
|
|
|
if (workflowExecuteThread.eventSize() == 0 |
|
|
|
if (workflowExecuteThread.eventSize() == 0 |
|
|
|
|| StringUtils.isEmpty(workflowExecuteThread.getKey()) |
|
|
|
|| StringUtils.isEmpty(workflowExecuteThread.getKey()) |
|
|
|
|
|
|
|
|| !workflowExecuteThread.isStart() |
|
|
|
|| eventHandlerMap.containsKey(workflowExecuteThread.getKey())) { |
|
|
|
|| eventHandlerMap.containsKey(workflowExecuteThread.getKey())) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
@ -186,12 +187,13 @@ public class EventExecuteService extends Thread { |
|
|
|
StateEventChangeCommand stateEventChangeCommand = new StateEventChangeCommand( |
|
|
|
StateEventChangeCommand stateEventChangeCommand = new StateEventChangeCommand( |
|
|
|
processInstanceId, 0, workflowExecuteThread.getProcessInstance().getState(), processInstance.getId(), taskInstance.getId() |
|
|
|
processInstanceId, 0, workflowExecuteThread.getProcessInstance().getState(), processInstance.getId(), taskInstance.getId() |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
stateEventCallbackService.sendResult(address, port, stateEventChangeCommand.convert2Command()); |
|
|
|
stateEventCallbackService.sendResult(address, port, stateEventChangeCommand.convert2Command()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onFailure(Throwable throwable) { |
|
|
|
public void onFailure(Throwable throwable) { |
|
|
|
|
|
|
|
logger.info("handle events {} failed.", processInstanceId); |
|
|
|
|
|
|
|
logger.info("handle events failed.", throwable); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
Futures.addCallback(future, futureCallback, this.listeningExecutorService); |
|
|
|
Futures.addCallback(future, futureCallback, this.listeningExecutorService); |
|
|
|