Hi Team,
I am working on Temporal Java and I have a use case where I need to send a parameter received on a child workflow (through a signal event )to the Parent. Based on this value parent needs to route the workflow to a different logic. Is it possible to send the signal method outcome from child to parent?
Yes, i solved this by sending to parentworkflowId as param to child and as input for the signal to parent again:
Java example:
/**
* get the 'current' workflow that is running and give it a signal
*/
public void runningFlow(String workflowId, String signalName, Object signalValue) {
WorkflowExecution workflowExecution = WorkflowExecution.newBuilder().setWorkflowId(workflowId).build();
WorkflowStub workflow = getWorkflowClient().newUntypedWorkflowStub(workflowExecution, Optional.of("signal-parent"));
workflow.signal(signalName, signalValue);
}