I have a question around the expected result of calling Get on a Child workflow that has been given a cron schedule. Currently IsReady always returns false, and the Get call blocks indefinitely.
My thought was that if it had completed at least one run then it would return the latest result, What is the expected result?
More specifics:
An activity that makes a call to an external system, while the workflow is running this external system might change the data it returns.
Trying to keep this data up to date (we backoff to 15 minute retries so up to date can be within the last 15 minutes), instead of adding calls to that system in multiple activities, start a child workflow that queries on a cron schedule.
Then we can query the result of the child workflow future and get any up to date data.
Other potential solution:
It seems that if we did want to do this we would need to signal the parent workflow from the child workflow, and spawn a go routine looking for async signals that contain updated data. Even if this is referenced by a pointer if we updated it in the workflow code can it be propagated into an already running activity?
I don’t understand why you need a child workflow here. Can you keep retrying that particular activity using an exponential retry policy with MaximumInterval set to 15 minutes?
The first activity (that we turned into a child workflow) always succeeds (returns information). However sometimes it returns a different set of data. The reason we created it as a child workflow on a cron schedule was to get the information every 15 minutes while the parent workflow is running.
The second activity usually works, but sometimes it needs the params supplied to it to be updated with the new data returned from the child workflow. There are several activities that potentially need this new information added to them. the idea of the child workflow was to be able to update any activity that needs it with this updated information.
What is the suggested approach for this?
Potentially not needed anymore but is the child workflow with a cron schedule Get call meant to block indefinitely (i assume until the workflow is sent a terminate signal)?