I have a timer boundary event on a service task whereas the service task implementation sets the process variable ‘startTime’ (the dynamic value). I’m trying to take this value from form the service task and putting it in the duration expression of the timer event. But I get the following error message when trying to start the process: Cannot resolve identifier ‘startTime’ where ‘startTime’ is of type java.util.lDate.
Is it possible to access process variables inside timer boundary events which have been initialized by the service task holding the timer?
Now I set the Timer Definition type to “Date” (timeDate within the XML) and the Timer Definition to “${startTime.plusMinutes(1).toDate()}” but the exception keeps the same.
The date format ISO 8601 was not the issue here. The engine expects this format but it actually accepts both java.util.Date and org.joda.time.DateTime.
Finally I solved my “dynamic value” issue by changing the element type from Timer Boundary Event to a Timer Intermediate Catch event. So the timer is no longer attached to the activity but it is now part of the normal sequence flow. This gives the timer access to the dynamic value (process variable) which has been set by the service task one step before.
If you want to be able to use a boundary timer in an activity, the expression for that timer has to be resolved before the activity starts. I think you have to place the call to the delegate that solves the expression in the sequenceFlow that goes towards the activity.
@here Solution lies in having 2 out going sequence flow, one should be from boundary timer on task and another one should be from task it self. Then you can use some exclusive gateway on 2nd sequence flow and reroute that back to same task with a new timer value.