Flow instance properties

The Flow instance properties are used for data exchange between different tasks and decision points to achieve the wanted business function.

Introduction

An Execution URL is shared by the system after a specific flow is orchestrated and published, using the instructions as documented in Managing flow designer. A new instance of the flow gets generated every time the URL is clicked. For each such instance, a set of default or built-in properties are populated. In addition to the default properties, a series of custom properties can be introduced by the used task.

The properties are used for data exchange between different tasks and decision points to help build the right business function.

Flow instance properties

Refer to the following list of default properties that are initialized with each triggered instance.

Attribute Name Description Type
__tenantid The name of the tenant to which the user belongs. String
__locale The set of language- or country-based preferences for a user interface. String
status The status of the task (success or fail). String
statusDetails The status description of the task. String
error The object to find error-related details encountered by the flow. JSON
themeId The UUID of a customized theme that the user wants to configure for the flow. It must be declared as a query parameter, while the flow URL is triggered. String
user The user details fetched from CD. Scim
Note:
  • During the task execution, output parameters from certain tasks are added to the workflow context.
  • The properties status, status details, and error are reset at the beginning of each task. In the case of Page, it is possible to use those values for displaying the relevant error, or status details to the user.
  • The Execution URL can be enhanced with additional query parameters to insert new properties in addition to the default ones.
  • The inputs fields that are configured in the Page task are also persisted in the flow instance. For example, if a Page task has an input field,
<input type="text" name="username"></input> , the property "username" gets persisted in the flow instance, which corresponds to the name mentioned in the input field.
Refer to the following list of approval-based properties.
Attribute Name Description Type
applicationId The id of the application for which the access is requested. String
requestorId The id of the user that has requested access. String
requestId The id of the request generated by using initiate approval tasks. String
entitlementId The id of the entitlement for which the access is requested. String

Error property in flow instance

If the flow encounters any error during its execution, an error property is generated in the flow instance. The error is of JSON type.

In case of unrecoverable errors, the flow gets redirected to the default error_page and ends the instance. In the case of recoverable error, it is the decision of the user to decide the next action. The decision can be made from the messageId, messageDescription, or taskName, present in the error property.

When any particular task encounters some error, the status for that particular task is failed.

Use of properties while rendering templates

Similar to the other tasks, the flow instance properties are available for use during Page task. These properties can be used to replace macros and generate meaningful Error pages or Input forms that are needed for different business cases. The properties can be used as macros as: @context.propertyName@.

The macro can be composed as follows in case a specific property is nested: @context.propertyName.nestedPropertyName@.

Let's consider an example of an error property. The property can be accessed as follows while the flow is designed: @context.error@. Similarly, the messageId corresponding to the error can be accessed by using: @context.error.messageId@.

The user can access the nth level node inside the property through a macro by defining the property name, and '.' being the deliminator.

Note: If an invalid macro is used, for some reason, the macro gets displayed as it is and doesn’t resolve to any valid string.