cancel
Showing results for 
Search instead for 
Did you mean: 

cancelActiviti='true' + retry interceptor=>ActivitiException

workflowuser2
Champ in-the-making
Champ in-the-making
I have a call-activiti with async-continuation. Call-activiti is executed in a loop.
<callActivity id="callActiviti" name="Call activity" calledElement="calledActiviti2">
        <extensionElements>
          <activiti:in source="assigee" target="assigee"></activiti:in>
        </extensionElements>
        <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="assigeelist" activiti:elementVariable="assigee"></multiInstanceLoopCharacteristics>
      </callActivity>

I have a boundary error on the call-activiti:
<boundaryEvent id="boundaryerror1" cancelActivity="true" attachedToRef="callActiviti">
      <errorEventDefinition></errorEventDefinition>
    </boundaryEvent>

Next, I have added RetryInterceptor to the JobExecutor.

When a running path of call-activiti results into BpmnError, the whole process execution is cancelled (cancelActiviti="true"). However, all other running threads (different call-activiti loop path), throw the following exception when they try to execute the next steps:
org.activiti.engine.ActivitiException: No job found with id '59'
   at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:58)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at com.dell.activiti.interceptors.RetryInterceptor.execute(RetryInterceptor.java)
   at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:46)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)



Is there a way to suppress this?

pdt
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

Is the error message of log level Severe and has the following preceding line "exception during job acquisition: " ?
This is probably caused by the job executor that already has acquired the jobs from the database and because the call activity is deleted, an acquired job is also deleted.
Then the job is executed, but the database record is gone. But a possible solution could be to decrease the log level here to for example info. But let me know if this is the error message you get.

Best regards,

workflowuser2
Champ in-the-making
Champ in-the-making
Hi trademark

yes, the error message is SEV level.
The exception is thrown in the ExecuteJobsCmd.execute(commandContext) method:
JobEntity job = commandContext
      .getJobManager()
      .findJobById(jobId);
   
    if (job == null) {
      throw new ActivitiException("No job found with id '" + jobId + "'");
    }

I agree that lowering log lever for this error would be good.
Do you want me to create a JIRA for this and assign to you?

pdt

Hi,

Is the error message of log level Severe and has the following preceding line "exception during job acquisition: " ?
This is probably caused by the job executor that already has acquired the jobs from the database and because the call activity is deleted, an acquired job is also deleted.
Then the job is executed, but the database record is gone. But a possible solution could be to decrease the log level here to for example info. But let me know if this is the error message you get.

Best regards,