How do I invoke a new workflow using the newUntypedWorkflowStub api and passing in the context of existing workflow? i.e. untypedWorkflowStub.start(args)
My objective is to update an existing workflow input, and rerun it. Trying to accomplish this by creating a new workflow using newUntypedWorkflowStub, but if there is a way to update existing workflow’s input using another api and then use resetWorkflowExecution api, that would work too. But I’m not sure there is a way to update the input on a failed workflow hence I am trying to create a new workflow but need the context that was used.
I am trying to create a new workflow but need the context that was used
If the context is exposed via query method in the completed workflow, you could get it via query (you can query completed workflow executions up to the set namespace retention period) and pass it as input to your new execution.
If it’s not exposed via query handler, you can get the inputs of a workflow execution via api as shown in this forum thread, and then use them to pass to the new execution.