Process instances got stuck at the parallel gateway
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2014 05:51 PM
I am working on an application where BPM engine is developed using Activiti 5.13. There is one main process xml which conditionally invokes 4 different caller activities(sub processes) in parallel and all the 4 sub processes are routed to join using a parallel gateway. We noticed that there were many instances which have all the tasks completed (No active task in ACT_RU_TASK table for the given process instance id) however the ACT_RU_EXECUTION table indicate that the instance is stuck at the parallel gateway (No End time for parallel gateway step in ACT_HI_ACTINST while all other steps have and ) and has not ended, we have changed the parallel gateway to inclusive gateway but now just wondering is there any way through APIs to move forward those stuck instances at parallel gateway. Due to this issue some of the reporting stats like completed instances are shown incorrectly. Since I have joined team recently I do not have any log or exception trace for it.
I tried to reproduce this by creating a similar template but without any forms and fields in it but was unable to reproduce the scenario.
If anybody is aware please let me know if there is any such API or steps to be taken to move ahead such stuck instances. Once these parallel gateway completes the process will end as there is no further step after it.
With Thanks and Regards,
Rishi
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2014 02:56 AM
jUnit test would help me a lot to reproduce this issue.
http://forums.activiti.org/content/sticky-how-write-unit-test
Regards
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2014 08:58 AM
Thanks for your reply, I have created jUnit test and a sample process but wasn't able to reproduce this, I was just wondering if there is any way to mark such instances as complete as we have instances in production environment which needs to be marked as complete and they are stuck at the parallel gateway and does not have any end time for it. In the meantime I will continue to work on more scenarios to see if I can reproduce this.
Appreciate your help.
Thanks,
Rishi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2014 07:30 PM
After further searching on forum I found the below link which very much resembles the situation where I am in.
http://forums.activiti.org/content/process-end-time-not-available-process-end-listener
I have further explored and figured out that all the task of the main process as well as subprocesses triggered by the main process instance id are completed but the main or parent process instance does not have and end time, and action history for the same instance indicate that there is no end time for the parallel gateway which is the last step before completion of the instance.
Since we are using SpringProcessEngineConfiguration embedded in web server, I am not sure if there is any way to mark such instance completed again.
Could it be possible that the end time for the process instance is NULL because either ProcessInstanceEndHandler hasn't yet been invoked as the parallel gateway is not ended yet or it was invoked but the DB changes wasn't flushed.
Just wondering if the first condition above is true then how can I mark the parallel gateway as completed so that ProcessInstanceEndHandler gets invoked and do the rest of the job.
Eagerly looking for the help.
Regards,
Rishi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2014 05:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2014 01:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2014 12:43 AM
After further testing I have noticed that if there is any exception thrown by the global process execution listener (at process end event) this inconsistent state arrives, I might be wrong but it looked like the context get removed and the transactions done through it are rolled back causing execution in unstable mode,perhaps in such a condition like I am facing where it seems that instance is stuck up at gateway and since gateway activity cannot be signaled I could not figure out any way to resume this instance so that it gets back on track.
Please suggest if there is any way here.
With Thanks and Regards,
Rishi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2014 04:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2014 09:55 AM
Apologies for the long sentence, here is summary:
1. Process has an execution listener on the end event
2. The execution listener threw an exception which made the instance to roll back to parallel gateway
3. As per the ACT_HI_ACTINST and ACT_RU_EXECUTION the instance is waiting at parallel gateway
I am looking for any API in Activiti version 5.13 to make this instance move ahead.
With Thanks and Regards,
Rishi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2014 05:00 AM