Data types and formats

A data type defines which kind of value and format a field in a record can have. In some JavaScript actions, a type may make additional calculated properties available.

A type descriptor represents a data type as a JSON object, whose name property contains the data type name. You use these type descriptors to specify connector field types in a Connector descriptor. Type descriptors may use additional properties for type-specific configuration. Furthermore, the expected format of a record value depends on the data type.

Case

A case value represents a Workflow Accelerator case’s meta-data:

  {
    "id" : "5b0fd957d1dfff6f53e08b2c",
    "name" : "Approve Q1 report",
    "caseNumber" : 1  ,
    "creatorId" : "59a954b862f8a0632524ba24",
    "createTime" : "2018-05-31T11:15:35.669Z",
    "dueDate" : "2018-07-24T21:59:59.999Z",
    "priority" : "0",
    "link" : "https://workflow.signavio.com/55207c30e4b08cd0c2906280/cases/case/5b504320d1d0ff20f4a0b360",
    "milestone" : "New"
  }

This type provides the following properties.

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

Choice

A choice type represents a value from a fixed list of configured options. The value stores the string value of the selected option’s id property:

"value" : "g"

A type descriptor for a choice type with three options looks like this:

  	"type" : {
  	  "name" : "choice",
  	  "options" : [
  	    {
  	      "id" : "b",
  	      "name" : "Bronze"
  	    },
  	    {
  	      "id" : "s",
  	      "name" : "Silver"
  	    },
  	    {
  	      "id" : "g",
  	      "name" : "Gold"
  	    }
  	  ]
  	}

The type descriptor’s options property value stores a JSON array of choice option objects. Each option has id and name properties.

A choice option’s id property stores a unique alphanumeric key (characters a-z, A-Z, 0-9) that identifies the option within the choice type; no two options may have the same id. The user interface shows the name property’s value to the user.

Date

A date value represents either a date and time (such as 2012-02-14 09:20), just a date (2012-02-14), or just a time (09:20). Date values must always use the YYYY-MM-DDThh:mm:ss.SSSZ ISO 8601 date format and the UTC time zone:

"value" : "2012-02-14T09:20:00.000Z"

The type descriptor has a kind property with the value date, time, or datetime that specifies whether the value describes a date, a time of day or both (required):

"type" : {
	  "name" : "date",
	  "kind" : "datetime"
	}

For date and time values, execution only uses the date or time part of the value, respectively.

Duration

A duration value stores the length of a period of time, such as 2 weeks, as a number of seconds:

"value" : 1209600

The type descriptor has no configuration properties:

"type" : {
	  "name" : "duration"
	}

Email

An email value stores an email, such as the email that triggers a process with an email trigger.

The value includes the following properties.

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

Email address

An email address value stores a plain string:

"value" : "alice@example.org"

The type descriptor has no configuration properties:

	"type" : {
	  "name" : "emailAddress"
	}

File

A file value stores a reference to a file stored in the Workflow Accelerator database:

"value" : "5b5749a7d1dfff20f4adbb79"

This type provides the following properties.

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

JavaScript actions can use an API for Reading file contents.

The type descriptor has no configuration properties:

"type" : {
	  "name" : "fileId"
	}

ID

An ID stores a string reference that identifies an object, but has no other meaning:

"value" : "5b5749a7d1dfff20f4adbb79"

A link value stores represents an Internet address (a URL), such as a web site address, as a string value:

"value" : "http://www.example.org/"

The type descriptor has no configuration properties:

	"type" : {
	  "name" : "link"
	}

List

A list value stores an (ordered) array of values of some other type, such as Email address values:

"value" : [
	  "alice@example.org",
	  "bob@example.org",
	  "charlie@example.org"
	]

The type descriptor’s elementType property specified the list items’ type:

"type" : {
	  "name" : "list",
	  "elementType" : {
	    "name" : "emailAddress"
	  }
	}

Money

A money value stores a JSON object with amount and currency properties. The amount property stores a number. The currency property stores an ISO 4217 currency code:

"value" : {
	  "amount" : 12.40
	  "currency" : "EUR"
	}

The type descriptor has no configuration properties:

"type" : {
	  "name" : "money"
	}

Number

A number value stores a plain number, using a single . as decimal separator:

{
  "value" : 42
}

or:

{
  "value" : 42.42
}

The type descriptor has no configuration properties:

"type" : {
  "name" : "number"
}

Text

A text value stores a plain string:

"value" : "Example"

The type descriptor has an optional multiLine that indicates that the Workflow Accelerator user interface should display multiple lines, when set to true:

"type" : {
  "name" : "text"
}
"type" : {
  "name" : "text",
  "multiLine" : true
}

User

A user value stores the ID of a user in your organization.

The type descriptor has no configuration properties:

"type" : {
  "name" : "userId"
}

This type provides the following properties.

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

Yes/No checkbox

A yes/no checkbox value stores a Boolean value - true or false:

"value" : true

The type descriptor has no configuration properties:

"type" : {
  "name" : "boolean"
}