I am currently in the process of migrating a Step function that was initially created using the AWS interface. However, I have run into an issue while trying to replicate a specific behavior:
Depending on a certain condition, I need task 2 to either execute task 3 and return to task 1 or terminate the step function altogether. The problem lies with the red path shown in the image https://i.sstatic.net/A1vJv.png Here is the snippet of code I am working with at the moment:
sfn.Chain.start(OtherTaskWeDoNotCare)
.next(task1)
.next(
new sfn.Choice(this, "task2").when(
sfn.Condition.booleanEquals("$.isFinished", false),
task3.next(task1) // This part is causing issues
)
);
I would appreciate any assistance from someone who may be able to help me resolve this issue! Thank you in advance! 🙂