[Fix-13657][Master]NPE caused by the execution of workflow with startNode and forbidden task (#13668)
Co-authored-by: HomminLee <lihongmin@ysstech.com>
This commit is contained in:
parent
9d9ae9ad54
commit
fba59981d4
|
|
@ -1513,8 +1513,11 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> {
|
|||
*/
|
||||
private void setIndirectDepList(String taskCode, List<String> indirectDepCodeList) {
|
||||
TaskNode taskNode = dag.getNode(taskCode);
|
||||
List<String> depCodeList = taskNode.getDepList();
|
||||
for (String depsNode : depCodeList) {
|
||||
// If workflow start with startNode or recoveryNode, taskNode may be null
|
||||
if (taskNode == null) {
|
||||
return;
|
||||
}
|
||||
for (String depsNode : taskNode.getDepList()) {
|
||||
if (forbiddenTaskMap.containsKey(Long.parseLong(depsNode))) {
|
||||
setIndirectDepList(depsNode, indirectDepCodeList);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue