I have a process with two taks, in the first one the user selects a date (I'm using LocalDateTime) and the second one is gonna have a due date which is the date inputed on the first task, minus 12 hours.
What I'm dping right now is BDMBusinessVariable.Date.minus( 1 , ChronoUnit.HOURS ), but this does not seem to work, I've been stuck on this for days, can anyone give me a hand?
Hi,
Here is what I suggest:
In the due date calculation script of the second task (where schedule
is my business variable):
<code lang="groovy>
import java.time.Duration
import java.time.LocalDateTime
import java.time.temporal.ChronoUnit
Duration.between(LocalDateTime.now(), schedule.startDate.minus(12, ChronoUnit.HOURS)).toMillis()
HTH
Romain
Thanks so much, that is just what i was looking for !