Campaign - How to fetch long running workflow activities in ACS using workflowTask table


Workflow Task Duration

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

Clients usually set alerts for failed workflows but they often miss out on those workflows that have been running for a very long time due to stuck activities or activities processing for days on ACS instances.
This usually results in degraded performance and high DB consumption.

Workflow Task table contains information related to workflow activities and their run duration.

Monitoring the duration of activities can help overcome such situations and help maintain a healthy DB.


How to ensure awareness of long-running workflow activities

This can be achieved using a simple workflow. Below are the details of the workflow that can be created by clients to monitor long-running workflow activities:

  • Create a new workflow

  • Select a query activity

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

  • 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

This would help fetch those activities running for more than 1 hour.

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

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

On this page