Skip to content

Commit

Permalink
Fix notify failover WorkflowInstance will cause NPE (#15499)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanwenjun authored Jan 17, 2024
1 parent ace0860 commit 603dfa2
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,16 @@ public void releaseTaskGroup(TaskInstance taskInstance) {
} else {
ProcessInstance processInstance =
processService.findProcessInstanceById(nextTaskInstance.getProcessInstanceId());
if (processInstance == null) {
log.error("WorkflowInstance is null cannot wakeup, processInstanceId:{}",
nextTaskInstance.getProcessInstanceId());
return;
}
if (processInstance.getHost() == null || Constants.NULL.equals(processInstance.getHost())) {
log.warn("The next WorkflowInstance: {} host is null no need to wakeup, maybe it is in failover",
processInstance);
return;
}
ILogicTaskInstanceOperator taskInstanceOperator = SingletonJdkDynamicRpcClientProxyFactory
.getProxyClient(processInstance.getHost(), ILogicTaskInstanceOperator.class);
taskInstanceOperator.wakeupTaskInstance(
Expand Down

0 comments on commit 603dfa2

Please sign in to comment.