cancel
Showing results for 
Search instead for 
Did you mean: 

Relative Due Date

kilian
Champ in-the-making
Champ in-the-making
Hi,

I am trying to create a "due date reminder" relative (1 week before) to a date which is stored in a process variable.

I therefore created a task with a boundary timer event attached.
I wonder whether it is possible to specify the requirement described above in the events xml code.

Which would result in something like this:

<boundaryEvent id="boundarytimer1" name="dueDateReminder" cancelActivity="true" attachedToRef="usertask8">
      <timerEventDefinition>
        <timeDate>${dueDate} - 1Week</timeDate>
      </timerEventDefinition>
</boundaryEvent>

Or is this a completely wrong approach?

Regards
Kilian

PS: I am looking forward installing the new release right now Smiley Happy
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
Timer definition must have exactly one element from the following:

timeDate. This format specifies fixed date in ISO 8601 format, when trigger will be fired. Example:
<timerEventDefinition>
    <timeDate>2011-03-11T12:13:14</timeDate>
</timerEventDefinition>

As the userguide states, a string is expeced in the 8601-format. You should write some logic yourself (eg. spring-bean) that can handle the conversion/adding/substraction of time from and to variables, eg:


<boundaryEvent id="boundarytimer1" name="dueDateReminder" cancelActivity="true" attachedToRef="usertask8">
      <timerEventDefinition>
        <timeDate>timeUtil.addWeeks(dueDate, 1)</timeDate>
      </timerEventDefinition>
</boundaryEvent>


public class TimeUtil {
   public String addWeeks(Date original, int number) { …
}

kilian
Champ in-the-making
Champ in-the-making
Okay,

thank you very much for the super fast reply!

I will do it that way.

Kilian