cancel
Showing results for 
Search instead for 
Did you mean: 

Subprocess Starts again and again ?

danielbreitner
Champ in-the-making
Champ in-the-making
Hello everybody,

I am experiencing a very strange error here:

My Main-Process should start a Subprocess and after that has finished, the Main-Process should just exit.

The Subprocess is a very long running one, and after some time, the Main-process seems to be starting the Subprocess again. And after some time again and …

I took a look into the xml and so far everything seems to be pretty normal (this is a snippet from the xml where the subprocess is called:

 <callActivity id="RUN_IMPORT_PROCESS" name="Start Import" calledElement="import_boundary">
      <extensionElements>
        <activiti:in source="sourceId" target="sourceId"></activiti:in>
        <activiti:in source="businessKey" target="businessKey"></activiti:in>
      </extensionElements>
    </callActivity>

Does anyone of you have an idea what might cause this strange behaviour ?
I am using Activiti 5.9


Best regards,

Daniel
8 REPLIES 8

trademak
Star Contributor
Star Contributor
Hi,

This is not information to say anything about your problem.
Do you see any errors in the log? Is there a specific point in time when the sub process is started again?
Do you have a timer event defined in the main process?

Best regards,

danielbreitner
Champ in-the-making
Champ in-the-making
Hi, thanks for your answer.

I´ve attached the process image.

The process creates a UserTask and programmatically this UserTask is "completed".
The next step is that a ServiceTask is called which performs certain actions and after that the SubSprocess is started.

Now comes the weird thing: The SubProcess, and only the SubProcess is instantiated again and again.
Note: Note the complete process after completing the UserTask, not the ServiceTask - only the SubProcess.

There is no timer, and I can see in the process structure, that the parent of the SubProcess is always the same.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
if your subprocess is async/transactional, I it might be that the 'jobexecutor', responsible for async things, retries it if it takes more than 5 minutes..

danielbreitner
Champ in-the-making
Champ in-the-making
I tried it with sync and async if I recall correctly.
I will test that again.

Do you know if there is a way to configure that jobexecutor to ignore long-running processes ?
Our processes sometimes run up to 5 days …

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
The jobexecutor should afaik not be involved if it is non-async. But it still might if the subprocess is transactional. No clue for a solution then

danielbreitner
Champ in-the-making
Champ in-the-making
Do you know how I can find out whether the subprocess is transactional ?

Or do you know a way for the newly created subprocess to terminate itself if another process already exists ?

danielbreitner
Champ in-the-making
Champ in-the-making
Hi, this thread can be closed.

It was in fact the JobExecutor and the task was set to async.

This doesn´t free me from all of my problems, but this particular one is solved.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
thanks for reporting back….