File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -410,7 +410,26 @@ func (inst *IndependentInstance) handleTaskError(taskBehavior model.TaskBehavior
410
410
} else {
411
411
if containerInst .isHandlingError {
412
412
//fail
413
- inst .SetStatus (model .FlowStatusFailed )
413
+ containerInst .SetStatus (model .FlowStatusFailed )
414
+
415
+ if containerInst != inst .Instance {
416
+ // Complete Subflow trace
417
+ if containerInst .tracingCtx != nil {
418
+ _ = trace .GetTracer ().FinishTrace (containerInst .tracingCtx , err )
419
+ }
420
+
421
+ // spawned from task instance
422
+ host , ok := containerInst .host .(* TaskInst )
423
+
424
+ if ok {
425
+ behavior := inst .flowModel .GetDefaultTaskBehavior ()
426
+ if typeID := host .task .TypeID (); typeID != "" {
427
+ behavior = inst .flowModel .GetTaskBehavior (typeID )
428
+ }
429
+ inst .handleTaskError (behavior , host , err )
430
+ }
431
+ }
432
+
414
433
} else {
415
434
taskInst .appendErrorData (err )
416
435
inst .HandleGlobalError (containerInst , err )
You can’t perform that action at this time.
0 commit comments