Skip to content

Commit bcbc482

Browse files
committed
Send the same properties upon run error as for heathly stop
Closes OCTRL-1070.
1 parent 832ed65 commit bcbc482

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

core/environment/transition_goerror.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
package environment
2626

2727
import (
28+
"github.com/AliceO2Group/Control/core/controlcommands"
2829
"github.com/AliceO2Group/Control/core/task"
2930
"github.com/AliceO2Group/Control/core/task/sm"
3031
)
@@ -50,12 +51,21 @@ func (t GoErrorTransition) do(env *Environment) (err error) {
5051
return t.IsSafeToStop()
5152
})
5253
if len(toStop) > 0 {
54+
args := controlcommands.PropertyMap{}
55+
if cvs, err := env.Workflow().ConsolidatedVarStack(); err == nil {
56+
for _, key := range StopActivityParameterKeys {
57+
if value, ok := cvs[key]; ok {
58+
args[key] = value
59+
}
60+
}
61+
}
62+
5363
taskmanMessage := task.NewTransitionTaskMessage(
5464
toStop,
5565
sm.RUNNING.String(),
5666
sm.STOP.String(),
5767
sm.CONFIGURED.String(),
58-
nil,
68+
args,
5969
env.Id(),
6070
)
6171
t.taskman.MessageChannel <- taskmanMessage

0 commit comments

Comments
 (0)