cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel gateway problem when using Hazelcast process definition cache

kiddinho
Champ in-the-making
Champ in-the-making
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>
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 Smiley Happy
1 REPLY 1

jbarrez
Star Contributor
Star Contributor