Hi, I want to get the aktuell Date and check if a Date definied in an variable is reached. how to realise that with groovy in bonita?
Hello, please have a look at the screenshot below:
If the date is always 30 days, you can do this way, following the steps. If you need to create a script with a number of days coming from a variable, just be sure that your script return a valid time condition ;-)
Its that easy. Found it by myselfe.
Fix date and script: mydate.minus(30)
Hello, is this really related to Bonita ? Or is it a more general programation question ?
its bonita. i have to realise a deadline for one activity. whant to realise it with an boundary event (Timer) This deadline ist 30 days to a spezial Date
thanks for that. But it must be 30 Days bevor a spezial date. the way you show ist 30 Days after taking the Task. The spezial date is definied in a Variable a user set in another task... So one user set a deadline an the other user get an email 30 days befor the deadline is reached....
So choose "fixed date" instead of duration, and calculate the fixed date with a script that will use variables, etc. The variable must set be at the process level.
"Return" must be a java.lang.Long for a duration in ms or a java.util.Date that is the expiration date for the timer.