There are two workflow’s A, B. I need to get the result of workflow A from inside of an activity of workflow B.
Is it possible?
Thank you.
Hello @kishore_kumar
You can use a workflow client inside your activity (in workflow A) to query result of workflow B
So, when you register the activity in the worker you can inject an instance of the workflow client, similar on how it is done in this example with dbClient
and within your activity get the workflow result
const handle = this.client.workflow.getHandle(workflowId);
const resultPromise = handle.result();
Note that this is a blocking call, take a look to this post mentioning different approaches depending on how often you want to poll from your activity What is the best practice for a polling activity? - #2 by maxim
Another approach could be sending a signal (or signalWithStart) from workflowB to workflowA before workflowB completes.
If you want to share your use-case we can help with the design,
Antonio