Skip to content

Wait Answer Activity

The Wait Answer activity enables a bot to pause its execution after sending a response to a user. This allows the system to wait for a specified duration, anticipating further input or interaction from the user following the bot's last communication.

Field Description Requirement
Exclusive Determines if the activity receives a special job from a specific process, ensuring jobs run in order. Optional
Execution listeners Configures listeners for activity lifecycle events, including process, sequence flow, start, and end events. Optional
Multi-instance type Specifies whether multiple instances of this activity are created. Optional
Cardinality (Multi-instance) An expression or integer value defining the number of instances to create. Optional
Collection (Multi-instance) The name of a collection variable whose elements determine the number of instances. A new instance is created for each element. Optional
Element Variable (Multi-instance) The variable name under which each collection element is available to its newly created instance. Optional
Completion Condition (Multi-instance) An expression that, when evaluated to true, stops the creation of new instances. Optional
Is for compensation A flag indicating if this activity is intended for compensation purposes. Optional
Assignments Defines the assignee for a task, responsible for its completion. Defaults to $INITIATOR. Optional
Form key Provides a reference to a specific form. Optional
Form reference The form associated with a User Task, presented to the user upon opening the task. Optional
Validate form fields If true and the form is submitted, form fields are validated on the backend according to the form model restrictions. Optional
Due date The specific date and time by which the task should be completed. Optional
Priority An integer value indicating the priority of the task. Optional
Form properties Configures custom properties for the form. Optional
Task listeners Sets listeners for specific events within the task's lifecycle. Optional
Skip expression An expression that, if true, causes the activity's execution to be skipped. Optional
Category Defines the category of the BPMN element. Optional

Action Types & Examples

Execution listeners

  • Format: string
  • Example Result: "Start"

Multi-instance type

  • Format: string (enum: None, Parallel, Sequential)
  • Example Result: "Parallel"

Cardinality (Multi-instance)

  • Format: digit or expression
  • Example Result: "5"

Collection (Multi-instance)

  • Format: string (variable name)
  • Example Result: "myCollection"

Element Variable (Multi-instance)

  • Format: string
  • Example Result: "currentItem"

Completion Condition (Multi-instance)

  • Format: boolean or expression
  • Example Result: "true"

Assignments

  • Format: string (User ID or expression)
  • Example Result: "$INITIATOR"

Due date

  • Format: string (ISO 8601 datetime)
  • Example Result: "2024-12-31T23:59:59Z"

Priority

  • Format: digit
  • Example Result: "10"

Skip expression

  • Format: boolean or expression
  • Example Result: "true"

Task listeners

  • Format: string (enum: create, assignment, complete, delete)
  • Example Result: "complete"

Implementation Examples

Field Setup - Multi-instance type: Parallel - Cardinality (Multi-instance): "${processVariables.userCount}" - Element Variable (Multi-instance): currentUserId - Completion Condition (Multi-instance): "${completedInstances == processVariables.userCount}" - Assignments: "$INITIATOR" - Due date: "2024-12-31T23:59:59Z" - Priority: 10 - Category: "User Interaction" - Skip expression: "${processVariables.skipWait == true}"

Execution Parameters - waitDuration: PT5M (for 5 minutes) - messageToUser: "Thank you for your response. Please provide further details." - expectedInputType: "text"

Technical Notes

When configuring Task Listeners, the assignment event is fired before the create event. The $INITIATOR variable, when used in Assignments, automatically references the user who initiated the process. For multi-instance configurations, Parallel execution is generally recommended for User Tasks, while Sequential execution is often more suitable for Service Tasks to ensure ordered processing.