cancel
Showing results for 
Search instead for 
Did you mean: 

Using JUEL in timerEventDefinition is 'static'

captain_kirk
Champ in-the-making
Champ in-the-making
Hello we are using a timer start event to kick off a BP which is mainly used for sending email notifications. Currently we are using a JUEL expression as a poor mans CRON, i.e.

        <startEvent id="theStart">
            <timerEventDefinition>
                <timeCycle>${configurationService.getSendEvaluationRemindersTimer()}</timeCycle>
            </timerEventDefinition>
        </startEvent>      

which works perfectly fine. However we have observed that the job is bound to whatever value it was at deploy time. If we need to update the timeCyle we either redeploy the BPMN or delete it and add it back again.

Is there any other way we can reset the job to evaluate the JUEL expression again, kick the tires so to speak, whenever we want to change the CRON timer.

Thanks
2 REPLIES 2

captain_kirk
Champ in-the-making
Champ in-the-making
Sorry XML was blocked:

        <startEvent id="theStart">
            <timerEventDefinition>
                <timeCycle>${configurationService.getSendEvaluationRemindersTimer()}</timeCycle>
            </timerEventDefinition>
        </startEvent>
[code]

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Kirk,

What you can do is:


start —> user task  –+
                 ^——|

attach boundary timer to the user task with an expression. (may be you will need to change cron expression to duration …)
Do not cancel user task in the boundary event. When you will change variable in the user task and complete user task after that boundary timer will be recreated again.
Regards
Martin