cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow stuck at Parallel Gateway - Intermittently

shreyashsamani
Champ in-the-making
Champ in-the-making

Hi,

We are intermittently facing a problem related to Parallel Gateway. I have attached three images, one which shows workflow model configuration details and other two which shows state of workflow i.e. stuck and successful.

Here what happen is, after successful start of workflow, execution reaches to parallel gateway which moves to 3 user tasks i.e. User Task 4 - User Task 5  - User Task 6. Now user completes User Task 5 so that particular execution moves to next node which is one input for Parallel Gateway. For User Task 4, boundary timer gets hit so it's execution also reaches another input of Parallel Gateway. Now the problem is that sometimes the execution is not moving to the next node which is Inclusive gateway.

This issue is not happening always. It has an intermittent behavior i.e. 2 times out of 10 cases. Can anybody tell me what's the problem here.

 

Version: Activiti - 5.15.1

Multiple(3) activiti engine with job scheduler enable in all instances.

2 REPLIES 2

cjose
Elite Collaborator
Elite Collaborator

Hi,

Intermittent issues are always hard to debug! 5.15.1 is quite an old version! Have you tried upgrading to one of the most recent versions on 5.x (5.22.0) or even 6.0?
If you are getting the same error even after an upgrade, you may want to dig more into the ACT_EVT_LOG & ACT_HI_ACTINST tables using the stuck process instance ids. Such an approach may help you to find out some common patterns that will help reproduce the issue. If you are successful in reproducing the issue, please raise an issue on the Activiti project with a unit test which will help the team/contributors fix the issue!

Thank you.

shreyashsamani
Champ in-the-making
Champ in-the-making

Thanks for reply Ciju Joseph‌. After analyzing logs and database entries of successful workflow and stuck workflow I found below details:

In case of successful workflow:

DEBUG [org.activiti.engine.impl.persistence.entity.ExecutionEntity] inactive concurrent executions in 'Activity(sid-3834FD88-F389-4D28-92CB-2B4948FBBBCF)': [ConcurrentExecution[193446], ConcurrentExecution[193447]]
DEBUG [org.activiti.engine.impl.persistence.entity.ExecutionEntity] other concurrent executions: [ConcurrentExecution[193445]]
DEBUG [org.activiti.engine.impl.history.DefaultHistoryManager] Current history level: AUDIT, level required: ACTIVITY
DEBUG [org.activiti.engine.impl.bpmn.behavior.ParallelGatewayActivityBehavior] parallel gateway 'sid-3834FD88-F389-4D28-92CB-2B4948FBBBCF' activates: 2 of 2 joined

ACT_HI_ACTINST:

ID_PROC_INST_ID_EXECUTION_ID_ACT_ID_ACT_NAME_ACT_TYPE_
192466192464192464sid-9CC591A5-8190-45B6-8545-C212DD156377StartstartEvent
193169192464192464sid-3DB1DC99-635E-4D68-8C44-BED1F6901F95System Task 3serviceTask
193444192464192464sid-3CBE9DCB-C2F3-48F0-B04E-67F6F4BD5FE0-parallelGateway
193450192464193445sid-CD24A1B8-EDEC-445E-8459-1994E3B00E72User Task 6userTask
193471192464193469sid-73E2A983-15B1-4FAB-81FB-F654E5EC8609User Task 4userTask
193530192464193528sid-1C14D193-DA7A-4F5B-8242-60F4AEB5F2BDUser Task 5userTask
194230192464193447sid-3834FD88-F389-4D28-92CB-2B4948FBBBCFPG2parallelGateway
200430192464193469sid-8C6396F9-8160-4FDD-997E-B72103E3B3A2TimeoutboundaryTimer
200434192464193446sid-2C4DB32B-1C81-41E5-867D-17C82F149F57-exclusiveGateway
200436192464193446sid-3834FD88-F389-4D28-92CB-2B4948FBBBCF-parallelGateway
200444192464193446sid-5276E5A7-5E11-46DF-9201-483ABAF4AC69-inclusiveGateway
200447192464193446sid-ED9A8E65-876C-447A-88DD-2D96BEC1FC6CUser Task 7userTask

ACT_RU_EXECUTION:

ID_REV_PARENT_ID_ACT_ID_IS_ACTIVE_IS_CONCURRENT_IS_SCOPE_IS_EVENT_SCOPE_SUSPENSION_STATE_CACHED_ENT_STATE_
1934451192464sid-CD24A1B8-EDEC-445E-8459-1994E3B00E72110017
1934462192464sid-ED9A8E65-876C-447A-88DD-2D96BEC1FC6C110017

In case of stuck workflow:

DEBUG [org.activiti.engine.impl.persistence.entity.ExecutionEntity] inactive concurrent executions in 'Activity(sid-3834FD88-F389-4D28-92CB-2B4948FBBBCF)': [ConcurrentExecution[193423]]
DEBUG [org.activiti.engine.impl.persistence.entity.ExecutionEntity] other concurrent executions: [ConcurrentExecution[193422], ConcurrentExecution[193424]]
DEBUG [org.activiti.engine.impl.history.DefaultHistoryManager] Current history level: AUDIT, level required: ACTIVITY
DEBUG [org.activiti.engine.impl.bpmn.behavior.ParallelGatewayActivityBehavior] parallel gateway 'sid-3834FD88-F389-4D28-92CB-2B4948FBBBCF' does not activate: 1 of 2 joined

ACT_HI_ACTINST:

ID_PROC_INST_ID_EXECUTION_ID_ACT_ID_ACT_NAME_ACT_TYPE_
192428192426192426sid-9CC591A5-8190-45B6-8545-C212DD156377StartstartEvent
193114192426192426sid-3DB1DC99-635E-4D68-8C44-BED1F6901F95System Task 3serviceTask
193420192426192426sid-3CBE9DCB-C2F3-48F0-B04E-67F6F4BD5FE0-parallelGateway
193428192426193422sid-CD24A1B8-EDEC-445E-8459-1994E3B00E72User Task 4userTask
193467192426193465sid-73E2A983-15B1-4FAB-81FB-F654E5EC8609For ActionuserTask
193522192426193520sid-1C14D193-DA7A-4F5B-8242-60F4AEB5F2BDUser Task 5userTask
194232192426193424sid-3834FD88-F389-4D28-92CB-2B4948FBBBCF-parallelGateway
200401192426193465sid-8C6396F9-8160-4FDD-997E-B72103E3B3A2TimeoutboundaryTimer
200412192426193423sid-2C4DB32B-1C81-41E5-867D-17C82F149F57-exclusiveGateway
200415192426193423sid-3834FD88-F389-4D28-92CB-2B4948FBBBCF-parallelGateway

ACT_RU_EXECUTION:

ID_REV_PARENT_ID_ACT_ID_IS_ACTIVE_IS_CONCURRENT_IS_SCOPE_IS_EVENT_SCOPE_SUSPENSION_STATE_CACHED_ENT_STATE_
1934221192426sid-CD24A1B8-EDEC-445E-8459-1994E3B00E72110017
1934232192426sid-3834FD88-F389-4D28-92CB-2B4948FBBBCF010017
1934242192426sid-3834FD88-F389-4D28-92CB-2B4948FBBBCF010017

From logs of ExecutionEntity class it seems like in case of stuck workflow, one execution from User Task 5 to Parallel Gateway is still getting considered as incomplete/active though user has completed the action. Because of this condition (nbrOfExecutionsJoined==nbrOfExecutionsToJoin) of ParallelGatewayActivityBehavior class becomes false.

Please guide.

Just for reminder:

Version: Activiti - 5.15.1

Multiple(3) activiti engine with job scheduler enable in all instances.