Propagation of child workflow state to parent after a rerun (reset)

Hello,

We have a parent workflow P, which starts child workflow C, which runs activity A. If A fails for some reason, we rerun (reset) C from the point before A failure. Let’s assume A now succeeds and thus rerun of C succeeds too.

The problem is, state of the parent workflow P is not changed after child workflow C was reset. The parent workflow is still failed. In our case at least, it would be natural for P to change it’s state to Completed, as rerun of C (still having P as its parent) is now also Completed.

Is there a way to “propagate” child workflow state to parent after a rerun (reset) ?

As an another option, would restarting the whole child workflow (from the parent’s event history) result in parent’'s state change ?

Thanks

Hello @sstro

“reset” creates a new workflow execution, which is not linked to the parent workflow.

The problem is, state of the parent workflow P is not changed after child workflow C was reset. The parent workflow is still failed

The workflow history can not be modified, once the workflow is closed (terminated / completed /failed… ) there is no way to change its state

Is there a way to “propagate” child workflow state to parent after a rerun (reset) ?

One thing you can do is to start your child workflow asynchronously, with PARENT_CLOSE_POLICY_ABANDON and, from the child workflow, signal the parent workflow before the child gets completed. You can get the parent workflowId from Workflow.getInfo().getParentWorkflowId()

Reset has known limitations when child/parent relationships are involved. You witnessed one of them.

We plan to address them in the future.