Genpact Cora Knowledge Center

Support

Activity Instance Expressions

Overview

Use activity-instance expressions to retrieve data and metadata related to any activity-instance.

To use activity-instance expressions, as the prefix, enter the activity name in curly brackets {}, or, if you need the current activity instance context, use the act prefix. For example, act.CreatedBy.FirstName.

By default, the engine retrieves values for the last activity instance, last row, and so on, unless you define the expression differently.

The activity instance is represented by the ActivityView object, or any of its derived types, which you can reference in the expression as a scope variable, for example, {activity name}.

Activity-Instance Expression Example

If you want to retrieve the approvers that approved a task in all the task iterations, you would use the following expression.

{Mng Approval}.Query("ApprovalData").Count(field("Approver") = "Approve)

The Query in this expression is where you indicate the form's data model query, for example, a data table.
The same methodology works for multiple form rows or Web services.

Important information about activity instance expressions:

  • The return activity instance view is always normalized.
  • The scope variable {activity name} returns the last activity instance of the activity you specified.