11-23-2016 10:07 AM
12-09-2016 02:27 PM
Hi Alexander,
I think you may have actually stumbled across an edge case that is not handled properly.
The intended behavior of "exclusive" is (as you already understand) to prevent concurrent execution within a single process instance. It's very useful for parallel joins which can lead to pre-emptive DB lock contention and can also be useful in multi-instance scenarios.
Looking at your model, I see you are already using Exclusive and Async on the Sub Process Call, I doubt this will have any effect since Called Activities (sub Processes) are their own individual process. Async may help a little since the parallel sub processes may not get executed simultaneously, but there is really no guarantee of this.
I agree with your analysis that the retrieval and updating of the nrOfCompletedInstances variable in the leave method of the behavior class should be in a synchronized block. For the majority of scenarios, the sub-process instances will not complete at exactly the same time, so there will be little if any performance impact, however for your scenario, it will resolve the issue.
Can you go ahead and create a Jira and then log the Jira number back into the forum for reference?
Thanks for your patience.
Regads,
Greg
11-26-2016 03:44 AM
11-28-2016 12:34 AM
11-28-2016 07:07 AM
12-09-2016 02:27 PM
Hi Alexander,
I think you may have actually stumbled across an edge case that is not handled properly.
The intended behavior of "exclusive" is (as you already understand) to prevent concurrent execution within a single process instance. It's very useful for parallel joins which can lead to pre-emptive DB lock contention and can also be useful in multi-instance scenarios.
Looking at your model, I see you are already using Exclusive and Async on the Sub Process Call, I doubt this will have any effect since Called Activities (sub Processes) are their own individual process. Async may help a little since the parallel sub processes may not get executed simultaneously, but there is really no guarantee of this.
I agree with your analysis that the retrieval and updating of the nrOfCompletedInstances variable in the leave method of the behavior class should be in a synchronized block. For the majority of scenarios, the sub-process instances will not complete at exactly the same time, so there will be little if any performance impact, however for your scenario, it will resolve the issue.
Can you go ahead and create a Jira and then log the Jira number back into the forum for reference?
Thanks for your patience.
Regads,
Greg
01-04-2017 05:25 AM
Hi Greg,
Thanks for the response! I opened a new issue in Activiti's JIRA. Here's the link:
https://activiti.atlassian.net/browse/ACT-4255
Best regards,
Alexander
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.