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