cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with intermediate catch event and retries

fwachs
Champ in-the-making
Champ in-the-making
I have a very simple problem and I'm not sure why it's happening at all.
Maybe anyone can enlighten me somehow Smiley Happy

This is what's going on:

- I'm running activiti 5.11
- I have configured Activiti to run with 1 retry only and changed  JobExecutor.lockTimeInMillis to 5 hours
- I have a process that makes a "call activity" to another process that as soon as it begins it has a timer for one minute:
- I'm running on mysql


    <intermediateCatchEvent id="timerintermediatecatchevent3" name="TimerCatchEvent">
      <timerEventDefinition>
        <timeDuration>PT1M</timeDuration>
      </timerEventDefinition>
    </intermediateCatchEvent>


When this sub process gets started it takes a really really long time to execute the rest of the process, way longer than the minute I have configured on the bpmn file.

Here's an example of how it looks like on my DB:

ID_   PROC_DEF_ID_   PROC_INST_ID_   EXECUTION_ID_   ACT_ID_   TASK_ID_   CALL_PROC_INST_ID_   ACT_NAME_   ACT_TYPE_   ASSIGNEE_   START_TIME_   END_TIME_   DURATION_
6262467   EnvioSMSpreguntanueva:18:6013770   6262463   6262465   timerintermediatecatchevent3   NULL   NULL   TimerCatchEvent   intermediateTimer   NULL   2013-05-11 20:58:17   2013-05-12 16:59:17   72060320


Also, for some reason the entire process ( and the subprocess) are being retried until the process ends sucessfully, this has led to many problems, since the process is only meant to be ran once because of tasks it runs. Is there a way to revoke any kind of retrial for good?

Thanks,
Federico
10 REPLIES 10

mmaker1234
Champ in-the-making
Champ in-the-making
Hello Federico,

That is what I'm talking about - you should (learn to) control the Activiti transactions in your process design.

Additionally I would not rely on a workflow engine to send 10K messages for me. I would write or extend my application to handle the mailing tasks instead, and the workflow process to notify when and what have to be sent. Then the workflow activity will need only to inform my application to do the job and to expect the application to notify back that the job is done. Additionally I would design the workflow process to control the time for and the result of the task execution and to notify me on time-out or task failure. Such an approach proved its reliability in our solutions, nevertheless this is nothing more than our approach - you can always find your own but always select your tools wisely (just because the ice is a frozen water like the snow and the ski have an edge similar to the skates doesn't mean that you can successfully skiing with skates or play hockey with ski).