I recently spotted a little gotcha when resubmitting a logic app.
The scenario was that my logic app had an error and I needed it to be resubmitted. I have some logic in it and there is a scope which will check if the Logic App should process the message. When the message should be ignored it will go down the branch to ignore the message then terminate. When I resubmitted the logic app the behaviour was not what I expected. You can see in the below picture.
What happened here is that the Logic App is originally called by a parent Logic App using the call workflow shape. The child then responds via the response shape when its done.
When I resubmit the child there is no caller waiting for a response so when I go down my branch to ignore the message and then terminate, there is no caller for the response shape so it will be skipped. This means the terminate shape is then skipped too because I did not have the run after to include terminate running on skipped. The result is that when Response and Terminate are skipped then the Event Filtering scope completes successfully so my next scope which normally wouldnt have been reached because of the terminate now thinks that everything is fine so it starts to execute. You can see this in the below.
The lesson learned here is in real world more complicated workflows you need to be careful about the response shape in a resubmit scenario. This will be skipped on resubmit and subsequent actions may not execute as you thought they might. Any shape after a response probably needs a run after to include skipped. Hopefully you now dont fall for this one