Workflow Execution Scenarios

A workflow continuously executes activities until there are no more activities to execute or until all currently executing activities are waiting for input. The input can come from a user, an external system, or an expiring timer. While waiting for input, the workflow becomes idle. A host can unload workflows that have gone idle and reload them to continue execution when the input arrives. To unload the workflow when it becomes idle, the host must persist the workflow instance.

Workflow execution scenario

Persistence of the workflow instances and associated data is required in the following scenarios:

  • A workflow is started within an application, unloaded due to a Bookmark, and resumed from the same application.

  • A workflow is started within an application server, unloaded due to a Delay, and resumed from the application server.

  • A workflow is started based on a Schedule, unloaded due to a Delay, and resumed from the application server.

  • A workflow is started based on a Schedule, unloaded due to a Bookmark, and resumed from the application server.

The hosts involved in the workflow vary depending on the Anthology configuration and environment. For more information about the hosts, see Host Processes.

Bookmark

Bookmarks are the mechanism that enables a workflow activity to passively wait for input without holding onto a workflow thread. A bookmark is the point at which execution can be resumed (and through which input can be delivered) within a workflow instance. External code is responsible for resuming the bookmark with relevant data. Multiple bookmarks can be scheduled at the same time.

For information about creating different bookmark types, see CreateBookmark and CreateBookmark<>.

To see how CreateBookmark and ResumeBookmark activities can be used in a workflow, refer to:

Delay

A Delay activity creates a timer for a specified duration. The workflow instance is unloaded until the timer expires.

Other activities related to workflow persistence include:

  • StateMachine
  • State
  • FinalSate
  • Persist
  • NoPersistScope
  • Pick
  • PickBranch
  • Parallel

For more information about these activities, see Generic Activities.

Schedule

Event scheduling can be used to start a workflow on a recurring schedule. For more information see Event Scheduling.

The web client for Anthology Student 20.0 and later enables you to set up schedules to trigger workflows. In the web client, select the Processes tile, locate System Administrator in the tree, and select Background Processes. On Background Processes page, add or edit jobs and then schedule the jobs so that they are executed as a background process.