These are configuration formats when outputting Date and Datetime data via EL syntax. They are available for updating the data of Date-type and Datetime-type Data Items in [Update Data] steps, setting timer datetime, and setting values for each Task. In addition to Fixed values, references to Date-type/Datetime-type Data Items, references to Case Start Datetime/System Time, and conversion from strings can be used. You can also specify values such as 30 minutes later, 7 days later, end of the month, etc., based on the referenced date/time.
BPMN Icon: [Update Data], [Timer Intermediate Event], etc.
(Enter a Fixed Date / Time in the Specified Format)
| Format | Assigned Value in Date-type | Assigned Value in Datetime-type |
|---|---|---|
| 2020-03-14 23:45 | 2020-03-14 (2020-03) (03-14) (2020) Follows the subtype setting of the assignment destination |
2020-03-14 23:45 |
Case Start Datetime
| Format | Assigned Value in Date-type | Assigned Value in Datetime-type |
|---|---|---|
| processInstanceStartDatetime | 2020-03-14 | 2020-03-14 23:45 |
| processInstanceStartDatetime.addMinutes(30) | 2020-03-15 | 2020-03-15 0:15 |
| processInstanceStartDatetime.addHours(2) | 2020-03-15 | 2020-03-15 1:45 |
| processInstanceStartDatetime.addDays(3) | 2020-03-17 | 2020-03-17 23:45 |
| processInstanceStartDatetime.addMonths(-4) | 2019-11-14 | 2019-11-14 23:45 |
| processInstanceStartDatetime.addDays(#q_num.intValue()) ※ | 2020-03-17 ※ | 2020-03-17 23:45 ※ |
| processInstanceStartDatetime.addMonths(1).getFirstTimeInMonth() | 2020-04-01 | 2020-04-01 00:00 |
| processInstanceStartDatetime.addMonths(1).getLastTimeInMonth() | 2020-04-30 | 2020-04-30 23:59 |
| processInstanceStartDatetime.addDays(1).getFirstTimeInDate().addHours(9) | 2020-03-15 | 2020-03-15 9:00 |
※ Instead of specifying a fixed value, the value in Numeric-type Data Item (q_num) is referenced
System Clock
The day
| Format | Assigned Value in Date-type | Assigned Value in Datetime-type |
|---|---|---|
| #today | 2020-03-14 | 2020-03-14 00:00 |
| #today.addMonths(1) | 2020-04-14 | 2020-04-14 00:00 |
The time
| Format | Assigned Value in Date-type | Assigned Value in Datetime-type |
|---|---|---|
| #now | 2020-03-14 | 2020-03-14 23:45 |
| #now.addDays(-7) | 2020-03-07 | 2020-03-07 23:45 |
| #now.addDays(1).getFirstTimeInDate().addHours(9) | 2020-03-15 | 2020-03-15 9:00 |
Date-type/Datetime-type Data Item
| Format | Assigned Value in Date-type | Assigned Value in Datetime-type |
|---|---|---|
| #q_datetime | 2020-04-01 | 2020-04-01 9:00 |
| #q_datetime.addHours(9) | 2020-04-01 | 2020-04-01 18:00 |
String
| Format | Assigned Value in Date-type | Assigned Value in Datetime-type |
|---|---|---|
| #dateFormatter.parse('yyyy-MM-dd HH:mm', '2021-04-12 09:45') | 2021-04-12 | 2021-04-12 09:45 |
| #dateFormatter.parse('yyyy-MM-dd HH:mm', #dateFormatter.format('yyyy-MM-dd 12:23', #q_date)) | 2021-04-12 | 2021-04-12 12:23 |
Conditional Date Selection (Ternary Operator)
In EL syntax, the ternary operator in the format condition ? value-if-true : value-if-false is available. It can also be used when assigning values to Date-type/Datetime-type Data Items, and can be applied to select the earlier (or later) of two datetime values.
| Format | Assigned Value (Example) |
|---|---|
| #q_date1 < #q_date2 ? #q_date1 : #q_date2 | The earlier date between "q_date1" and "q_date2" |
| #q_datetime1 < #now ? #now : #q_datetime1 | If "q_datetime1" is in the past, the current datetime; otherwise "q_datetime1" |
Notes
- Mutual conversion (assignment) between Date-type (Y/M/D) and Datetime-type is possible
- E.g. "Date-type: 2020-03-14" => "Datetime-type: 2020-03-14 00:00" / "Datetime-type: 2020-03-14 23:45" => "Date-type: 2020-03-14"
- Date-type (unlike Datetime-type) does not hold time/minute information
- Works at 23:59 of the day when applied to a Deadline, and at 00:00 when applied to a Timer Intermediate Event
- In [Update Data], if nothing is set as the configuration format, "empty" is assigned. (The data is cleared.)