microflow execution order

0
Hi, I have a question about in which order things are done in a microflow and if a breakpoint in the microflow changes anything. The setup is that I have a page with an order form which auto saves to my order entity. There is an option to delete the order and when that button is pressed a pop-up asks if the user is sure.  The delete button calls a microflow that does 3 things.  1. It closes the pop-up 2. It deletes the order 3. It navigates to another page If I have the order 1-2-3 or 2-1-3 I get an error form the auto save function that the order does not exist. When I set a breakpoint in the microflow and step through everythong it seems that 1 and 3 are not done until the end of the microflow. Are they somehow queued up and sent to the client later? Given that I have an auto save function to the object I want to remove on the page I am leaving, what is the safe way of removing it? Should the order in my microflow be 1-3-2 so that all client actions are ready to be done once the deletion is done?
asked
3 answers
2

The order of activities in a microflow are executed in the order they are placed in the microflow, and thus the microflow can be read as a timeline. Except for client actions; close/show page or refreshes, these are collected and executed at the end of the microflow. So in your microflow, a different order doesn't have any impact.

About the auto commit and delete error, not sure what is happening there. One thing I can safely say; it has nothing to do with the order of activities in the microflow, connected to the delete button. Rob's comment is a good start point of further debugging " The error message tells me that you are trying to save an order that is already deleted and so the platform has nothing to save.  "

answered
0

Hi Johan,

  What are you using to do an 'auto save'? Do you have on-change microflows that commit the objects when you change a field? Do you have an event handler?  The error message tells me that you are trying to save an order that is already deleted and so the platform has nothing to save.  

answered
0

Johan,

Does the Delete action have Refresh in Client checked?  If so, uncheck that.  That refresh will trigger any on change microflows (which I am guessing is the auto save you mention) on the now deleted Order object.

Hope that helps resolve your issue,

Mike

answered