Hi, we have a use case where a workflow needs to return a result to calling client and continue execution as new workflow (different workflow fn but same workflow id). However it seems like success return result is ignored if the workflow return NewContinueAsNewError?
It is not currently possible. We plan to add this as part of the synchronous update feature.
The current workaround is to have a workflow that returns the value and starts an abandoned child workflow that implements background processing.
thanks Maxim! glad to hear that its part of the future planned feature
The current workaround is to have a workflow that returns the value and starts an abandoned child workflow that implements background processing.
we thought of this (please cmiiw) where WorkflowA execute WorkflowB as child with abandon policy, but given that both the WorkflowA and WorkflowB needs to have same workflow ID, is this even possible?
cos i imagine we need someone else to execute WorkflowB just after WorkflowA is finished. but then we might need some mechanism to ensure no race condition happen where client execute another WorkflowA (and steal the workflow ID) in between the time when prev WorkflowA is finished and WorkflowB is executed?