activity make duplicate entries in to act_ru_job table for circular execution of workflow

cancel
Showing results for 
Search instead for 
Did you mean: 
nprajapatiasite
Active Member

activity make duplicate entries in to act_ru_job table for circular execution of workflow

Hi,

i have created one workflow cyclic flow.

one user task is with boundary timer and timer is connected to service task and that service task output is as input to user task (i have uploaded image for this).

issue is, when boundary timer execute than another job is created for same after service task completed.

below i mentioned my timer configuration.

 

"timerdurationdefinition": "P1D",
"timerdatedefinition": "",
"timercycledefinition": "R10/P1D"

i have also attache database record for same 

can anyone suggest any solution or it is activity bug?

or any solution to restrict new jobs ?

5 Replies
bassam_al-saror
Alfresco Employee

Re: activity make duplicate entries in to act_ru_job table for circular execution of workflow

I guess thats normal. Every time the execution completes the service task it will create a new user task and a boundary job. You might need to add an exclusive gateway after the service task to decide whether to continue to user task or do something else.

nprajapatiasite
Active Member

Re: activity make duplicate entries in to act_ru_job table for circular execution of workflow

Hi Bassam,

Thank you so much for your response ans i appreciate your answer.

one more thing that, is there any way to stop timer job to create new job in "act_ru_job" table?

bassam_al-saror
Alfresco Employee

Re: activity make duplicate entries in to act_ru_job table for circular execution of workflow

As long as a new user task with a timer boundary is created it will continue to create new jobs and insert new rows in "act_ru_job" table. 

How many times do you want this to run? From the "timercycledefinition" I guess you want it to run for 10 times. Why did you choose to return back to the user task after completing the service task? If you want to run it for only 10 times then add end event after the service task.

nprajapatiasite
Active Member

Re: activity make duplicate entries in to act_ru_job table for circular execution of workflow

Thanks for your answer,

it is created by mistakes in QA  Environment, so is there any way to stop such types of recursion if client create such types of workflow?

bassam_al-saror
Alfresco Employee

Re: activity make duplicate entries in to act_ru_job table for circular execution of workflow

You can suspend the process instances RuntimeService (Activiti - Engine 5.22.0 API)  and also suspend the whole process definition RepositoryService (Activiti - Engine 5.22.0 API)