Hi,
I have a question about a general dev pattern.
I have a main workflow which runs on a schedule(once a week) and I have a dependant child workflow, which relies on the data written to an external system from the parent. The child workflow, on the other hand, depends on this data as well as a time factor.
What I want to achieve is to run the child workflow on a different schedule (once a day) and also trigger it if the parent ran before the daily trigger.
I am thinking that I could just try to create a new schedule on main workflow run and trigger an execution on first run and all subsequent runs of the main workflow. If the schedule already exists, I just trigger it.
An alternative is to not have the parent child relationship and just try to trigger the “child” schedule from the main workflow in case it exists.
I wonder if there is a more elegant or canonical way to implement this with temporal. I hope the explanation is clear enough.
Thanks!