Skip to content

Commit 014119e

Browse files
committed
Publish fill_info vars at healthy EOR
1 parent 87f0609 commit 014119e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

core/environment/transition_stopactivity.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,21 @@ func (t StopActivityTransition) do(env *Environment) (err error) {
6464
// Get a handle to the consolidated var stack of the root role of the env's workflow
6565
if wf := env.Workflow(); wf != nil {
6666
if cvs, cvsErr := wf.ConsolidatedVarStack(); cvsErr == nil {
67-
68-
// Propagate run end time to all tasks
69-
if value, ok := cvs["run_end_time_ms"]; ok {
70-
args[strcase.ToLowerCamel("run_end_time_ms")] = value
71-
args["run_end_time_ms"] = value
67+
// in principle, only stable beams end should change among fill info vars in a typical scenario,
68+
// but just in case of more creative uses, we push all of them again.
69+
for _, key := range []string{
70+
"fill_info_fill_number",
71+
"fill_info_filling_scheme",
72+
"fill_info_beam_type",
73+
"fill_info_stable_beams_start_ms",
74+
"fill_info_stable_beams_end_ms",
75+
"run_end_time_ms",
76+
} {
77+
if value, ok := cvs[key]; ok {
78+
// we push the above parameters with both camelCase and snake_case identifiers for convenience
79+
args[strcase.ToLowerCamel(key)] = value
80+
args[key] = value
81+
}
7282
}
7383
}
7484
}

0 commit comments

Comments
 (0)