Hi All,
My scenario is
I received a request and i create multiple child workflows from that request.
Now, I want to call @UpdateMethod on specific child workflow.
What is the best way to do this?
Hi All,
My scenario is
I received a request and i create multiple child workflows from that request.
Now, I want to call @UpdateMethod on specific child workflow.
What is the best way to do this?
Direct workflow to workflow update has not yet been implemented. Use activities to call updates. If the update is long-running, use a signal to make a request and let the child send a reply signal when the request is processed.
Updates are not long running in this case also, can I get any example of calling updates through activities.
you have to use the WorkflwoClient,
Inject the workflow client into your activity when the worker registers it
worker.registerActivitiesImplementations(new GreetingActivitiesImpl(client));
and from your activity you can create the workflowStub and call update
public String composeGreeting(String greeting, String name) {
client.newUntypedWorkflowStub("").update(...)
...
Antonio
I would recommend using typed stub where possible:
client.newWorkflowStub(ChildWorkflow.class, "id").whateverUpdateMethod(...)