Open MercatoDocsSearch docsAPI reference

User guide

Monitoring Workflows

Find the workflow instance for the case you are investigating. The detail view shows the current step, recorded execution history and anything that still needs attention.

Workflow Instances List

The instances list shows all running and completed workflows. Access it via Workflows β†’ Instances in the backend interface.

List Columns:

Filtering and Searching:

Instance Detail View

Click an instance to view its details:

Overview Section

Workflow Context

View the current workflow data:

{
  "orderId": "order-123",
  "customerId": "cust-456",
  "amount": 150.00,
  "transactionId": "txn_abc123",
  "items": [
    { "productId": "prod-1", "quantity": 2 }
  ]
}

This data is accessible to all steps and activities via variable interpolation ({{context.orderId}}).

Execution Timeline

The timeline shows every event that occurred during workflow execution:

Each event includes:

Common Statuses

StatusDescriptionWhat to Do
RUNNINGWorkflow is actively executingNormal – workflow is progressing
COMPLETEDWorkflow finished successfullyReview results and context data
FAILEDWorkflow encountered an error and stoppedDebug the error (see below)
PAUSEDWorkflow manually paused by userResume or cancel
WAITING_FOR_SIGNALWaiting for external eventSend the expected signal or wait for timeout
WAITING_FOR_ACTIVITIESAsync activities still processingWait for activities to complete
CANCELLEDWorkflow manually cancelledNo action needed

Debugging Failed Workflows

When a workflow fails, the instance detail view shows:

Error Information

Common Failure Causes:

Example Error Event

{
  "eventType": "ACTIVITY_FAILED",
  "occurredAt": "2024-01-15T10:45:00Z",
  "eventData": {
    "activityId": "call-payment-gateway",
    "activityType": "CALL_API",
    "error": {
      "message": "Payment gateway returned 503 Service Unavailable",
      "code": "NETWORK_ERROR",
      "retryable": true
    }
  }
}

Retry Options

For transient failures (network errors, timeouts), you can:

  1. Manual Retry: Click Retry to re-execute the failed activity
  2. Resume: Continue the workflow from the failed step
  3. Cancel: Stop the workflow and mark it as cancelled

πŸ’‘ Tip: Configure automatic retries with retry policies to handle transient failures without manual intervention.

Learn more about retry policies β†’

Performance Monitoring

Execution Times

View how long each step and activity took to execute:

Step Duration:

START: < 1ms
review-request: 2 days, 3 hours
send-notification: 1.2s
END: < 1ms

Activity Duration:

send-approval-email: 0.8s
call-payment-gateway: 2.3s
update-order-status: 0.5s

Use Cases:

Bottleneck Identification

Long-running workflows often stall at:

Example Execution Log

Here's a complete execution timeline for an approval workflow:

[
  {
    "eventType": "WORKFLOW_STARTED",
    "occurredAt": "2024-01-15T10:00:00Z",
    "eventData": {
      "instanceId": "wf-inst-123",
      "workflowId": "purchase-approval-v1",
      "initialContext": { "orderId": "order-123", "amount": 150.00 }
    }
  },
  {
    "eventType": "STEP_ENTERED",
    "occurredAt": "2024-01-15T10:00:00Z",
    "eventData": {
      "stepId": "start",
      "stepName": "Start"
    }
  },
  {
    "eventType": "STEP_EXITED",
    "occurredAt": "2024-01-15T10:00:00Z",
    "eventData": {
      "stepId": "start"
    }
  },
  {
    "eventType": "TRANSITION_TAKEN",
    "occurredAt": "2024-01-15T10:00:01Z",
    "eventData": {
      "transitionId": "start-to-approve",
      "fromStepId": "start",
      "toStepId": "approve-request"
    }
  },
  {
    "eventType": "ACTIVITY_STARTED",
    "occurredAt": "2024-01-15T10:00:01Z",
    "eventData": {
      "activityId": "send-approval-email",
      "activityType": "SEND_EMAIL"
    }
  },
  {
    "eventType": "ACTIVITY_COMPLETED",
    "occurredAt": "2024-01-15T10:00:02Z",
    "eventData": {
      "activityId": "send-approval-email",
      "output": { "messageId": "msg-123", "sentAt": "2024-01-15T10:00:02Z" }
    }
  },
  {
    "eventType": "STEP_ENTERED",
    "occurredAt": "2024-01-15T10:00:02Z",
    "eventData": {
      "stepId": "approve-request",
      "stepName": "Approve Request",
      "stepType": "USER_TASK"
    }
  },
  {
    "eventType": "USER_TASK_COMPLETED",
    "occurredAt": "2024-01-15T12:30:00Z",
    "eventData": {
      "taskId": "task-456",
      "completedBy": "user-789",
      "formData": { "decision": "approve", "comments": "Approved for budget" }
    }
  },
  {
    "eventType": "STEP_EXITED",
    "occurredAt": "2024-01-15T12:30:00Z",
    "eventData": {
      "stepId": "approve-request"
    }
  },
  {
    "eventType": "TRANSITION_TAKEN",
    "occurredAt": "2024-01-15T12:30:01Z",
    "eventData": {
      "transitionId": "approve-to-end",
      "fromStepId": "approve-request",
      "toStepId": "end-approved"
    }
  },
  {
    "eventType": "STEP_ENTERED",
    "occurredAt": "2024-01-15T12:30:01Z",
    "eventData": {
      "stepId": "end-approved",
      "stepName": "Approved"
    }
  },
  {
    "eventType": "WORKFLOW_COMPLETED",
    "occurredAt": "2024-01-15T12:30:01Z",
    "eventData": {
      "instanceId": "wf-inst-123",
      "finalContext": {
        "orderId": "order-123",
        "amount": 150.00,
        "decision": "approve",
        "approvedBy": "user-789"
      }
    }
  }
]

Best Practices

For Workflow Designers

For Administrators

For Developers

Next Steps

See Also:

Previous: Workflows Overview Β· Next: Signals