How to fetch long running workflow in ACS using workflowTask table

Description description

Campaign Standard
Fetching Workflow Task duration details

Usually, clients set alerts for failed workflows, but they often miss out on those workflows that have been running for a very long time due to the stuck-up activities or activities processing for days on ACS instances. This results in a degraded performance and high database consumption.

Resolution resolution

Workflow Task table contains information related to workflow activities and their run durations. Monitoring the duration of activities can help improve the performance and maintain a healthy database.

Workflow Task details can be fetched from xtk:workflowTask table.

How to ensure awareness of long-running workflow activities

This can be achieved using a simple workflow. Follow the steps below to create a workflow to monitor the long-running workflow activities:

  1. Create a new workflow

  2. Select a query activity

  3. Select the Resource and Targeting dimension as: WorkflowTaskDetail (xtk:workflow task:workflowTaskDetail)

  4. Now, in the Target section, use the below queries:

Duration is more significant than 3600


Activity name does not start with a schedule


Activity name does not begin with signal

Above workflow creation would help you fetch those activities running for more than 1 hour.

Setting an alert to this query condition can help the clients monitor the running workflow activities for a long duration.

NOTE: In the duration condition, please ensure you set the time duration in seconds and not in minutes or hours.