Microflow is not terminating

1
Hi all,   We have a long running microflow that is triggered by the user, which creates and manipulates a number of objects.   The problem we are seeing is that once the Microflow has completed all the actions it does not appear to terminate i.e. we continue to see the blocking progress bar.   We are calling the microflow asynchronously and have made numerous performance optimisations. Through logging (and enabling the debugger) we can see that the microflow has completed all the actions and if we refresh the page we can clear the progress bar and the data is as expected.   Is there something we can do to make the Microflow terminate quicker?    
asked
1 answers
1

Tarig,

I have seen this behavior also.  I think that Mendix simply loses track of the progress bar/processing due to the length a microflow takes to complete, so its unable to send the message to my browser that the microflow is complete.

One approach I have used is to execute this microflow via RunMicroflowAsyncinQueue or executeMicroflowInBackground java actions from the Community Commons module.  These java actions run the microflow in a queue, without making the browser wait for the microflow to complete.  If you need to notify the user that a particular microflow has finished, you'll need to do this via a messaging approach of some sort (in your app, via email, etc.).

One other possibility is you may find the Process Queue module valuable.  I haven't used it, but if you are running microflows that take a long time, this may be a way to manage that process.

Hope that helps,

Mike

answered