setProperty
Defines a property and its value. Workflows triggered in the same transaction can access the property and read it using the getProperty function or reset it to a different value.
The getProperty and setProperty functions allow you to exchange data between workflows.
Syntax
function setProperty(propertyName: string, value: any): void
| Parameter | Description |
|---|---|
propertyName
|
Name of the property. |
value
|
Property value. |
Examples
In this example, we define a property called age that stores the age for a 46 years old customer.
Copy
setProperty('age', 46);
In this example, we define a property called names that stores a preson's first, middle, and last name.
Copy
setProperty('names', {'first': 'Jonathan', 'middle': 'Schmoe', 'last': 'Doe'});