Hi,
I’m working on modeling a business use case where, at the moment, I’m creating a parent workflow and N child workflows when the workflow is started; however, after the start of the workflow there may be other requests that come in to add other child workflows.
To help illustrate here’s a made up example that has a similar modeling:
Say we’re building a platform to manage a Competition. Once the competition owner has defined the details and rules of their competition they can invite users and publish for others to join. In Temporal we’d like to model the Competition as a workflow that tracks the lifecycle of the competition (start, end, and key points to notify all participants of) and we’d like to track each participants progress on the competition as a child workflow.
The basic lifecycle of the parent/competition wf might be:
- Wait for human to approve the competition
- Spin up child workflow to track money movement from 1 account to another so that winners can be paid.
- Publish competition to folks that may be interested
- Notify specific individuals
- Create N child workflows for participants knowns at creation time
- Use Signals to track key milestones, e.g. first participant (child wf) to reach milestone X notify all participants.
etc…
The basic lifecycle of the child/participant wfs might be:
- Send reminders
- Give them the next steps as they reach specific milestones
- Track time limit for specific milestones.
etc…
With this structure how would one add a new child workflow after the parent/competition workflow has already started as new participants are added (up to some cutt-off date)?
Thank you!