Changing child workflow argument risk

Hi team,

For some reason, i need to change the values of arguments of child workflows when parent workflow executes a child workflow. e.g.
in parent workflow:
args := funcA()
future := ictemporal.ExecuteChildWorkflow(ctx, childworkflow, args)
args := funcB() //no structural change, only the value
future := ictemporal.ExecuteChildWorkflow(ctx, childworkflow, args)

Is there any non-determistic error risk if i make the change without versioning check?
Note: the child workflow commands path will not be affected due to the args change.

To what i understand, when child workflow replay, i think it should be fine, if the child workflow already started, the old arguments are set, and it won’t get changed while replay.
One thing i’m not clear is would parent replay? e.g. if an activity in child workflow failed, and when parent replay happens, does 1) parent workflow re-executes a new child workflow with new argument value or 2) parent workflow doesn’t replay and continues the old child workflow with old argument or 3) something else.

if it is the case1), are we producing non-deterministic arguments? and we need to do version check for the child workflow execution?


The arguments are not checked during replay. So you should be fine. But please test :).

Hi Max, thanks for your response. does parent workflow re-executes a new child workflow while replaying? or only child workflow gets replayed and parent workflow doesn’t.

Workflows replay when their state should be recovered to continue executing or responding to a query. Recovery of parent and child workflows is fully independent.

1 Like