These are configuration formats for output of strings via EL syntax. The formats are available for assigning values to String-type Data Items in Service Task (Data Assignment), for setting up an email message in Throwing Message Intermediate Event (Email), and for settings values for each Task. You can use fixed values, data references, and App/Process reference information to assign values to String-type Data Items. You can also use formatting functions to specify the output format, and functions to calculate JSON/XML escapes and hash values.
BPMN Icon: [Service Task (Data Assignment)]
Workflow Variables
Workflow Platform
Application Root URL (System variable)
Format | Assigned value |
---|---|
${var[applicationRoot]} | https://sample.questetra.net/ |
App
App ID
Format | Assigned value |
---|---|
#{processModelInfoId} | 12 |
App Name
#{processModelInfoName} | Inquiry-handling flow |
Process
Process ID
Format | Assigned value |
---|---|
#{processInstanceId} | 12345 |
p#{processInstanceId} | p12345 |
#{#sformat('%d', processInstanceId)} | 12345 |
#{#sformat('%04d', processInstanceId)} | 12345 |
#{#sformat('%06d', processInstanceId)} | 012345 |
Process Sequence Number (Application variable)
#{processInstanceSequenceNumber} | 67890 |
#{#sformat('%06d', processInstanceSequenceNumber)} | 067890 |
xyz#{#sformat('%06d', processInstanceSequenceNumber)} | xyz067890 |
Process Start Time
#{processInstanceStartDatetime} | 2020-03-14 09:45:00 |
#{#format(processInstanceStartDatetime, 'dd.MM.yyyy HH:mm (E) Z')} | 14.03.2020 09:45 (Wed) -0500 |
#{#format(processInstanceStartDatetime, 'M.yy')} | 3.14 |
Process Start User
#{processInstanceInitQuserName} | SUZUKI Ichiro |
#{processInstanceInitQuser?.getEmail()} | suzuki@example.com |
Process Start Organization
#{processInstanceInitQgroupName} | Sales |
#{processInstanceInitQgroup?.getEmail()} | sales@example.com |
Data Items
String-type
Format | Assigned Value |
---|---|
#{#q_string} | ABC, def |
Numeric-type
Format | Assigned Value |
---|---|
#{#q_numeric} | 12,345.67 USD |
#{#sformat("%1.1f", #q_numeric)} | 12345.7 |
- Prefix/suffix, point notation, etc. will follow the process data setting
Select-type
#{#q_select_radio} | Brazil |
#{#q_select_radio?.![value]} | br (choice ID of the selection) |
#{#q_select_check} | Japan, Brazil (display labels of the selections) |
#{#q_select_check?.![value]} | ja, br (IDs of selection) |
#{#q_select_check?.get(1)} | Brazil (the second choice label) |
#{#q_select_check?.get(0)?.value} | ja (the first choice ID) |
- When multiple choices are checked, the delimiter is ", (comma)".
Date/Datetime-type
#{#q_date} |
2020-03-14 (Date-type Y/M/D) |
#{#q_datetime} | 2020-03-14 23:45 (Datetime-type) |
#{#format(#q_datetime, 'dd mm, yyyy')} | 14 03, 2020 |
- Follows the sub-type settings in the Data Item
File-type
#{#q_file} | ((file name)) |
User-type
#{#q_user} | SUZUKI Ichiro <suzuki@example.com> |
#{#q_user?.name} or #{#q_user?.getName()} |
SUZUKI Ichiro |
#{#q_user?.id} or #{#q_user?.getId()} |
13 |
#{#q_user?.email} or #{#q_user?.getEmail()} |
suzuki@example.com |
Organization-type
#{#q_org} | Sales <sales@example.com> |
#{#q_org?.name} or #{#q_org?.getName()} |
Sales |
#{#q_org?.id} or #{#q_org?.getId()} |
5 |
#{#q_org?.email} or #{#q_org?.getEmail()} |
sales@example.com |
Table-type
#{#q_table} | 2 row(s) |
#q_table.summary['price'] | 1.00 |
#{#q_table?.get(0, 2)} | Cash |
#{#q_table?.rows?.![#this['name'] + '|' + #this['price']]} | Orange|1.00, Apple|1.25 |
Discussion-type
#{#q_discussion} | ------- [2020-02-07 13:29] <NAKAMURA Haruko> Hello, Goodbye (Assigning to single-line will result in an error) |
Guide Panel-type
n/a | (Display only) |
Functions
Format | Assigned value |
---|---|
#{#escapeEcmaScript(#q_json_data)} | ((JavaScript escaped string)) |
#{#escapeXml(#q_xml_data)} | ((XML escaped string)) |
#{#sha256(processInstanceTitle)} | ((Hash string)) |
#{#randomString(12)} | pJBAzTDft8wT ((12 alphanumeric characters: [0-9a-zA-Z]{12})) |
#{ #join( #q_table?.rows?.![ #this['name'] + '|' + #this['price'] ], #NL) } |
Orange|1.00 Apple|1.25 ((Concatenate and output cell values of Table-type data)) |
#{ #join( #q_table?.rows?.![ #join(cols, ' | ') ], #NL) } |
Transportation: taxi|12.50|Cash Transportation: Airplane ticket|150.00|Credit Card ((Concatenate and output cell values of Table-type data)) |
Notes
- The Expression Language used for the variable is based on the implementation of SpEL (Spring Expression Language)
- Formats with multiple variables can be set to String type Data
- E.g. If you set 'Process ID is #{processInstanceId}. Process Sequence number is #{processInstanceSequenceNumber}', the values of 'Process ID is 12345. Process Sequence number is 67890' will be assigned
- If there is a conflict, such multiple lines of data being assigned to a single-line String-type Data Item, it will result in an error
- If you do not set anything in the format settings, a blank will be assigned (data will be deleted)
- '%04d' (decimal notation plus 4 Digit zero (0)Padding) is processing to add a leading zero to make it 4 characters long
- Also works with an old format using the data definition number (data ['9']) instead of the field name (q_numeric)
Comments
0 comments
Please sign in to leave a comment.