Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82362

Prevent concurrent exec of two (or more) microflows

$
0
0

Hi,

I have microflows M1 and M2, (M3...). I know that I can se concurrent exec. for them to "Disallow", and prevent each from running multiple instances at a time. But, I need to prevent both (or all) of them to run simultaneously.

I tried to do this by inserting (and committing) a record right at the start of each microflow. Each microflow also checks if the record exists, before beginning the actual work. When the "work" is done, the microflow deletes this record, and makes the entity (table) empty - allowing other microflow to take over. See the linked image. http://i60.tinypic.com/2ebvla9.jpg link

What's happening (I think), is that the "commit" happens only at the end of execution, and M1 obtains a lock on the entity until it's finished. So, although this approach works, it is prone to DB locks.

How can I allow commit immediately, without waiting till end of exec? Is there any alternative approach to achieve this (disallow concurrent for many MFs)?

Thanks.


Viewing all articles
Browse latest Browse all 82362

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>