Datetime specified by an expression
I am setting a delay in the middle of a workflow using a Timer Intermediate Event, and I want to specify a certain period after the contents of a Date-type item (e.g. 2 weeks after the specified date).
It seems that by selecting the "Datetime specified by an expression" option this is possible, but I don't know what format the expression should be in.
Is there a reference page that explains this?
-
You can find a list of expressions that can be used in a [Timer Intermediate Event] in the following page:
R2271: Output of Date and Datetime Data via EL syntax
With reference to the above page, you can set an expression in the [Timer Intermediate Event] by selecting "Datetime specified by an expression" and inputting, for example, "#q_specified_date.addDays(14)". *
This will cause the [Timer Intermediate Event] to wait until 14 days after the date specified in the referenced Date/Datetime-type data item.
We also recommend the following method:
- Set 2 Datetime-type data items; one to store the specified date, and one to store the target date (in this case, 2 weeks after the specified date)
- Use an [Update Data] step to update the 2nd Datetime-type with the target date using an expression from the reference page (e.g. In [Update Data], set the data item as the target date, and set the expression as "#q_specified_date.addDays(14)") *
- Then, in the [Timer Intermediate Event] set "Datetime specified by Data Item" as the target date data item
In this way, you can store both dates in separate data items and they will both be visible in the Process details, making it easier for other users to understand the process, and for audits, etc.
* Please note that the data item reference must be changed depending on the data item Field Name in your workflow App.
サインインしてコメントを残してください。
コメント
1件のコメント