File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
packages/oss-console/src/components/WorkflowGraph Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -451,7 +451,6 @@ const parseWorkflow = ({
451451 }
452452
453453 const templateNodeList = context . template . nodes ;
454-
455454 /* Build Nodes from template */
456455 for ( let i = 0 ; i < templateNodeList . length ; i ++ ) {
457456 const compiledNode : CompiledNode = templateNodeList [ i ] ;
@@ -475,6 +474,28 @@ const parseWorkflow = ({
475474 } ;
476475 }
477476
477+ /* Build failure node and add downstream connection for edges building */
478+ const failureNode = { ...context . template . failureNode , failureNode : true } ;
479+ if ( failureNode && failureNode . id ) {
480+ parseNode ( {
481+ node : failureNode as CompiledNode ,
482+ root,
483+ nodeMetadataMap,
484+ staticExecutionIdsMap,
485+ compiledWorkflowClosure,
486+ } ) ;
487+ nodeMap [ failureNode . id ] = {
488+ dNode : root . nodes [ root . nodes . length - 1 ] ,
489+ compiledNode : failureNode as CompiledNode ,
490+ } ;
491+ if ( ! context . connections . downstream [ startNodeId ] . ids . includes ( failureNode . id ) ) {
492+ context . connections . downstream [ startNodeId ] . ids . push ( failureNode . id ) ;
493+ context . connections . downstream [ failureNode . id ] = {
494+ ids : [ endNodeId ] ,
495+ } ;
496+ }
497+ }
498+
478499 /* Build Edges */
479500 buildWorkflowEdges ( {
480501 root,
You can’t perform that action at this time.
0 commit comments