AnsweredAssumed Answered

Boundary Timer and ISO 8601 usage

Question asked by jayehsea on Dec 7, 2012
Latest reply on Dec 8, 2012 by ronald.van.kuijk
I have a user task with a boundary timer attached. The boundary timer uses a process variable to set the time/date as follows:

    <userTask id="waitTask" name="Wait for Timer Elapse" activiti:assignee="system"></userTask>
    <boundaryEvent id="boundaryDailyTimer" name="Daily Task Boundary Timer" cancelActivity="true" attachedToRef="waitTask">

I progammatically set the value of nextRunTime to an ISO 8601 date/time format, such as '2012-12-07T10:47:00'. My process is successfully using the value to trigger the expected action within my business process. All is good.

For debugging purposes I needed to change the value of the nextRunTime process variable, so I could trigger the business process when I wanted. So I used SQL to modify the value in the database as follows:

update act_ru_variable set text_='2012-12-07T22:47:00' where text_='2012-12-07T10:47:00';

This updated the process variable in the database as expected. The application was NOT running while I made this update to the database. I restarted my application, and was surprised to find that the process using the updated process variable still fired at 10:47 AM, even though my application log showed that the nextRunTime variable value was indeed set to '2012-12-07T22:47:00' (or 10:47 PM).

I have other process executions that fire correctly for times such as '2012-12-07T22:47:00', at 10:47 PM. So it appears the 24 hour clock is honored by the boundary timer. I don't understand why my variable modifications were not honored by the processes.

So I have a couple questions:

1) Will using SQL to modify process variables in act_ru_variable have the desired effect on a process instance using that variable?
2) Are process variables maintained by the Activiti engine in another location, such as cache?
3) Is there another way that I should be modifying process variables stored in act_ru_variable table? Will this change be honored by the Activiti engine?

Thanks for helping me understand the workings of Activiti.