File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package instance
3
3
import (
4
4
"errors"
5
5
"fmt"
6
-
7
6
"github.com/project-flogo/core/support"
8
7
"github.com/project-flogo/core/support/log"
9
8
"github.com/project-flogo/flow/definition"
@@ -382,7 +381,20 @@ func (inst *IndependentInstance) handleTaskError(taskBehavior model.TaskBehavior
382
381
} else {
383
382
if containerInst .isHandlingError {
384
383
//fail
385
- inst .SetStatus (model .FlowStatusFailed )
384
+ containerInst .SetStatus (model .FlowStatusFailed )
385
+ if containerInst != inst .Instance {
386
+ // spawned from task instance
387
+ host , ok := containerInst .host .(* TaskInst )
388
+
389
+ if ok {
390
+ behavior := inst .flowModel .GetDefaultTaskBehavior ()
391
+ if typeID := host .task .TypeID (); typeID != "" {
392
+ behavior = inst .flowModel .GetTaskBehavior (typeID )
393
+ }
394
+ inst .handleTaskError (behavior , host , err )
395
+ }
396
+ }
397
+
386
398
} else {
387
399
taskInst .appendErrorData (err )
388
400
inst .HandleGlobalError (containerInst , err )
You can’t perform that action at this time.
0 commit comments