Parallel gateway problem when using Hazelcast process definition cache
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2016 12:47 AM
Hi all,
I has implemented process definition cache using hazelcast, it seems work fine but today we have a problem with it:
After parallel gateway joined, it was stuck in this parallel gateway.
After debug the code, I saw that method <b>findInactiveConcurrentExecutions</b> in class: <b>org.activiti.engine.impl.persistence.entity.ExecutionEntity</b>
Although we have 2 execution joined, the condition
Why do we compare memory address here, could we compare like that:
Thanks
I has implemented process definition cache using hazelcast, it seems work fine but today we have a problem with it:
After parallel gateway joined, it was stuck in this parallel gateway.
After debug the code, I saw that method <b>findInactiveConcurrentExecutions</b> in class: <b>org.activiti.engine.impl.persistence.entity.ExecutionEntity</b>
for (ActivityExecution concurrentExecution: concurrentExecutions) { if (concurrentExecution.getActivity()==activity) { if (!concurrentExecution.isActive()) { inactiveConcurrentExecutionsInActivity.add(concurrentExecution); } } else { otherConcurrentExecutions.add(concurrentExecution); } }
Although we have 2 execution joined, the condition
concurrentExecution.getActivity()==activity
always happen only 1 time. It seems because each call to hazelcast to get process definition from cache, it returns difference object instance –> memory address is difference.Why do we compare memory address here, could we compare like that:
concurrentExecution.getActivity().getId().equals(activity.getId())
?Thanks

Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 09:18 AM
Yes, you are correct. Here's the fix: https://github.com/Activiti/Activiti/commit/52f6142e5496404b0f60063a4d51266c171f7be0
