How to set a timer which activates ... days before set date

Hey there,

I am still really new to the Camunda Modeler and ran into a problem which I, up until now, couldn’t solve myself.
I got a task in which a user has to fill out a form, if the user doesn’t complete the task with in 28 days before a set date he should receive a mail, reminding him to complete it.

My problem is, that I can’t get the timer to work properly.
I have a variable (arbeit_ab), which is the set date, on which the task has to be completed.
For some odd reason, I haven’t figured out, how to subtract the 28 days from the variable arbeit_ab.

So far I have tried some of the following:
${arbeit_ab} - P28D
${arbeit_ab - 28}
${arbeit_ab.minusDate(28)}

Thanks in advance!

Hi @mohritz.

Please have a look at this solution to a related question

So the expression should be like this:

${dateTime().withMillis(arbeit_ab.getTime()).minusDays(28).toDate()}

Alternatively you could call a bean method via the expression and calculate the date in the code.