cancel
Showing results for 
Search instead for 
Did you mean: 

Using expressions in Time Cycle of Timer Start Event

andrealuciano71
Champ in-the-making
Champ in-the-making
Hi,

  I tried to define the Time Cycle property of a Timer Start Event as an expression calling a bean method.

  The purpose is to avoid hard-coding the cron expression in the diagram but also to read the configuration at Activiti startup, so that it would be possible to change a new schedulation without redeploying the diagram.

  Unfortunately for me Activiti BPM resolves the expression in Time Cycle only once, that is when the BPM diagram is redeployed and the relevant timer job gets created.

    Is there a solution to avoid redeploying the diagram just to change the schedulation underlying a Timer Start Event?
 
    The first idea that came to me was to give completely up the use of Timer Start Event in favor of an external scheduler such as Quartz.

    The second chance was to continue with the approach of expression in Time Cycle property and trigger a redeploy of the process on the time configuration changes.

     Another possibility could be to rebuild the Timer Job associated to the process.

    Has anyone else out there faced a similar problem?

    Regards.
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Currently it's only executed at deployment that's correct. That's because the timer job is created once at that time. So what kind of functionality would you like instead?

Best regards,

andrealuciano71
Champ in-the-making
Champ in-the-making
Hi,

  I was looking into the possibility to change the schedulation of a process without deploying the process again.
 
  As the current implementation of timer start event in Activiti seems to lack this option, I was wondering if someone else had experimented an alternative solution in a similar case.

   Kind regards,
   Andrea

jbarrez
Star Contributor
Star Contributor
You can update the due date in the ACT_RU_TABLE or through the Job entity in Java if you need to change the date of when the process will be started.