I have the following scenario:
My workflow has several activities, some are running in sequence and others are running in parallel
A1 ---A2 --- A4 --- A5 ------ A7 \ / A3 --- A6----
A3 and A6 are running parallel with A2, A4 and A5. A7 is waiting for both branches to complete.
I have implemented this flow using the DSL sample found in github. So far, so good.
Now … I have this case where I have to restart the flow from a specific point. Let’s say A5. It means I want to rerun the A5 activity and all the activities after that one. According to the Docs I need to use the CLI for that, so I need to provide the eventId for the last DecistionTaskCompleted. The thing is, I’m trying to figure out the best way to do so.
So far my best guess is to traverse the whole history array and just get the last DecisionTaskCompleted Id before the targeted activity I want to rerun, but that solution doesn’t seem to be the most reliable. Is there a better option?
PS: Using the CLI argument “LastDecisionCompleted” does’t work because A5 might be a successful activity