I am trying to set timer event with specific time date.
I proceed according to the documentation and I tried the first date from the documentation.
Time date
A specific point in time defined as ISO 8601 combined date and time representation. It must contain timezone information, either Z
for UTC or a zone offset. Optionally, it can contain a zone id.
2019-10-01T12:00:00Z
- UTC time
The modeler does not allow you to enter the time in this 2023-10-01T12:00:00Z
or this =2023-10-01T12:00:00Z
way. It ends with syntax error warning.
So my first try was expression with string representation ="2023-10-01T12:00:00Z"
.
Running process ends with error
Invalid duration format '2023-10-01T12:00:00Z' for expression '"2023-10-01T12:00:00Z"'
.
Second try was =date and time(2023-10-01T12:00:00Z)
that ends with error
Expected result of the expression 'date and time("2023-10-01T12:00:00Z")' to be one of '[DURATION, PERIOD, STRING]', but was 'DATE_TIME'
.
What is the correct way of setting time date into timer duration?
The documentation does not provide enough information.
Hi,
which modeler and which version of the modeler do you use.
I don’t get any error:
Sorry for not providing more information right away.
I am using Camunda Modeler 5.9.0 on Mac. I should have mentioned that I am trying to use a Timer Intermediate Catch Event, not a Timer Start Event. It is possible to use time date only in Timer Start Event?
I was thinking about a workaround in which I would use a script (Duration script in the diagram) to recalculate the date for the duration, which will be used in the event as a variable. But when does the timer start counting? From the moment when the value of the variable is set (in case the script and event-based gateway are not right next to each other) or from the moment the life cycle reaches the event-based gateway?
Thank you for your help
Hi,
Thanks for all the details.
But when does the timer start counting? From the moment when the value of the variable is set (in case the script and event-based gateway are not right next to each other) or from the moment the life cycle reaches the event-based gateway?
A timer starts counting once it has been enabled, i.e., an incoming sequence flow has been signaled. Calculating the duration upfront and then doing actions in between the calculation and timer will lead to a delay.
It is possible to use time date only in Timer Start Event?
Correct, you cannot use dates in intermediate timer events. As mentioned in the info box, it must be a duration.
1 Like