This topic applies only to the IBM Business Automation Workflow Advanced
configuration.

Evaluation of task elements and their replacement variables at run time

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15
Task elements can be queried by client applications to expose task-related information. The definition of these elements can contain replacement variables. For these variables to be replaced with values at run time, certain conditions must be met.
For the variable to be replaced by a value, both of the following conditions must be met:
  1. The variables are initialized before the task element is evaluated
  2. The task element is evaluated before the query from the client application
The following table describes which Human Task Manager replacement variables can be considered to be initialized before the completion of specific task-related actions. This allows both replacement variable initialization and task element evaluation to be done in the same task action.
Table 1. Task-related actions and the sequence of evaluation of the task elements and replacement variables
Task-related action Sequence of evaluation
Create a task
  1. Task element: People assignment for potential instance creators is evaluated
    1. Replacement variable: htm:task.potentialInstanceCreators is initialized
  2. Task element: People assignment for potential starters is evaluated
    1. Replacement variable: htm:task.potentialInstanceStarters is initialized
    2. Replacement variable: htm:task.instanceID is initialized
    3. Replacement variable: htm:task.displayName is initialized
    4. Replacement variable: htm:task.property.customPropertyName is initialized
  3. Task element: The task priority is evaluated
    1. Replacement variable: htm:task.originator is initialized
  4. Task element: The task description is evaluated
    1. Replacement variable: htm:task.description is initialized
Start a task
  1. Task element: No elements are evaluated
    1. Replacement variable: htm:input.[part|part\XPath|\XPath] is initialized
  2. Task element: The duration until the task is overdue is evaluated
  3. Task element: The duration until the task expires is evaluated
  4. Task element: People assignment for the administrator role is evaluated
    1. Replacement variable: htm:task.administrators is initialized
  5. Task element: People assignment for potential owners is evaluated
    1. Replacement variable: htm:task.potentialOwners is initialized
  6. Task element: People assignment for editors is evaluated
    1. Replacement variable: htm:task.editors is initialized
  7. Task element: People assignment for readers is evaluated
    1. Replacement variable: htm:task.readers is initialized
    2. Replacement variable: htm:task.starter is initialized
  8. Task element: The custom properties for the task are evaluated
    1. Replacement variable: htm:task.property.customPropertyName is initialized
  9. Task element: The inline custom properties for the task are evaluated
  10. Task element: The business category is evaluated
  11. Task element: The task priority is evaluated
  12. Task element: The task work basket is evaluated
  13. Task element: The task description is evaluated
    1. Replacement variable: htm:task.description is initialized
An escalation is created No task elements are evaluated. The following replacement variables are initialized:
  • htm:escalation.instanceID
  • htm:escalation.activationState
  • htm:escalation.expectedTaskState
  • htm:escalation.displayName
  • htm:escalation.description
  • htm:escalation.property.customPropertyName
An escalation is activated
  1. Task element: The escalation duration is evaluated
  2. Task element: The escalation properties are evaluated
    1. Replacement variable: htm:escalation.property.customPropertyName is initialized
  3. Task element: The escalation description is evaluated
    1. Replacement variable: htm:escalation.description is initialized or changed
An escalation is triggered
  1. Task element: Escalation receivers are evaluated.
    1. Replacement variable: htm:escalation.receivers is evaluated
    Note that the definition can refer to the escalation receivers of another escalation, for example, it can include a variable like htm:escalation(otherEscalationName).receivers.
  2. Task element: For email notifications, the email subject and body are evaluated
A task reaches an end state
  1. Task element: The duration until deletion of the task is evaluated
This table highlights the constraints that you must observe when specifying Human Task Manager replacement variables for task elements:
  • A task element should only include replacement variables that are initialized before the task element is evaluated:
    • Replacement variables that are initialized due to an earlier task action are the replacement variables that are located in rows that precede the row that contains the task element.

      For example, the replacement variable %htm:task.originator% is initialized when a task is created. Therefore, it can be included in the definition of the task element People assignment for potential owners that is evaluated when the task instance is started.

    • Replacement variables that are initialized as part of the same task action as the task element evaluation, but before the task element evaluation is done are shown on the same row. As indicated in the table, for selected task actions (task creation, task update, escalation activation, escalation timer expiration) an evaluation order is defined for both task elements and replacement variables. Based on this sequence, you can see which of the replacement variables are initialized before a task element is evaluated.

      For example, a replacement variable %htm:input.\param1% is initialized when the task starts, but before any of the task elements are evaluated. Therefore it can be included in the definition of the task element People assignment for potential owners that is also evaluated during the start of the task instance.

      If an evaluation order is not given in a table row, no specific evaluation order is guaranteed for that row.
  • A task element evaluation can imply the initialization of a corresponding replacement variable:
    • Some task elements have corresponding replacement variables that can be used by other task elements. For example, the task element People assignment for potential owners has a corresponding replacement variable %htm:task.potentialOwners%, that is initialized after the task element is evaluated. This means that task elements can be defined in terms of other task elements.