Variables reference

See Variables for an introduction.

Case variable

The Case variable contains the data that starting a case creates. This variable has several fields. You cannot change most of this data, except for the case name and due date.

An email has a composite type, with the following properties.

Property JavaScript Type Description
Case ID id ID Unique identifier
Name name Text Entered or generated editable name
Case number caseNumber Number Sequential case number
Creator creatorId User User who created the case
Start date createTime Date Date and time the Creator started the case
Due date dueDate Date Optional editable due date
Priority priority Text Case priority - values '0' (high) to '3' (low)
Case link link Text URL of the case page in Signavio Workflow Accelerator
Cycle time duration Duration The duration the case has been open
Milestone milestone Text The last milestone the case has passed

Case ID

The case variable’s ID uniquely identifies this case among cases for all processes.

Name

The Name field stores the name that either the Creator entered manually, or that Workflow Accelerator generated. Case participants can edit this name. You might use the case name variable in a Send email action configuration, to send emails that clearly identify their context by prefixing the subject line with the case name.

You can update the case name in a JavaScript action by assigning a value to _case.name.

Case number

The Number field stores a sequential case number. Each process uses a separate case number sequence for its cases. In a Handle customer order process, you could use the case number as a generated order reference, for example.

Creator

The Creator field records the Workflow Accelerator user who started the case. The User type includes name and email address fields, so you can use the case creator to configure a Send email action that automatically notifies the requestor of an approval process’ result.

Start date

The Start date records when the Creator started the case. In an order process, for example, you could use this as the order date.

Due date

The Due date field stores the due date that case participants can set on the case view. Unlike the other case variables, the due date does not always have a value.

You can update the case due date in a JavaScript action by assigning a value to _case.dueDate.

Trigger email variable

The Trigger email variable contains the email that started the case, for processes that have an Email trigger. You can use this variable to use information from the email that started the case during the process, and to send email to the sender.

This variable has the fields that the Email type defines. You cannot change their values.

Data types

Variables store workflow information. Each variable has a user-defined name and a type. A type can represent a single value, like text or an email address. ‘Composite’ types such as user, file or email consist of several values.

Composite types have a list of fields, each with its own (possibly composite) type. The table of fields includes the JavaScript name that you use to access a field in JavaScript code.

When using expressions or configuring some action, you refer to workflow data. This can use references to variables, or to fields inside composite variables. The user interface guides you and shows the options you have.

Choice

The Choice type stores a text value from a fixed list of configured options.

Date

The Date type stores a date, or a date and a time of day.

Duration

The Duration type stores the length of a period of time, such as 2 weeks. In the user interface, you can select from different time units. In JavaScript actions, Duration values store a number of seconds.

Email

The email type stores an email, which the email trigger uses. A variable stores the email that triggers the process. You can use the email’s data fields, such as from address or the attachments, later in the process.

An email has a composite type, with the follow properties.

Property JavaScript Type Description
ID id ID The unique identifier for this email
From from Email address The sender email address
From name fromName Text The sender’s display name (optional)
To to List of Email address The email addresses of the recipients
Reply to replyTo Email address The email address to send replies to (optional)
CC cc List of Email address Email addresses that receive a copy of the message (optional)
Subject subject Text The subject of the email (optional)
Body text bodyText Text The plain text message (optional)
Body HTML bodyHtml Text The HTML code for an HTML email (optional)
Attachments attachmentIds List of File The files to attach to the email (optional)

Email address

The email address type stores an email address.

File

The file type stores a reference to a file. JavaScript actions can use an API for reading file contents.

Property JavaScript Type Description
ID id ID The unique identifier for this email
Content type contentType Text The file’s media type
File name name Text The file’s name
Owner ownerId User The user who uploaded the file

ID

An ID has special kind of string type. Workflow Accelerator creates these IDs to identify objects; they have no other meaning. An ID string looks like 53fae958036471cea136ea83.

List

A list simply represents a collection of values. The list has an order and all elements have a single specified type.

Money

The Money type stores a currency amount for a particular currency.

Number

The Number type stores a number.

Object types

Objects have a composite type, with a list of named fields. For example: a user has an object type, with fields such as firstName, lastName, mailAddress.

Text

The Text type stores plain text.

User

A variable of type user refers to a user in your organization. A user has an object type, with the following properties.

Property JavaScript Type Description
ID id ID The unique identifier for this user
Email address emailAddress Email address The user’s email address
First name firstName Text The user’s first name
Last name lastName Text The user’s last name

Yes/No Checkbox

The Yes/No Checkbox type stores a single value that represents either Yes or No.