We have a use case where we need to run some steps sequentially at the beginning of a workflow followed by a bunch of tasks that need to be run in parallel. The difference though is that the number of tasks could vary for each request.
For example:
Request1: Start -> A -> B -> B1, B2 -> C -> C1, C2 -> D -> End
Request2: Start -> A -> B -> B1, B2, B3, B4, B5 -> C -> C1 -> D -> End
Note: Tasks separated with ->
are sequential whereas with ,
are to be run in parallel.
Is there a way to model this in step functions? One possible thing that we were thinking of doing is creating a state function for every request. Is this recommended? Or should I be considering using SWF and maintain the decider logic on my own?