Skip to main content

Lattice workflow stalled or failed alerts

What it does. Raises the Workflow stalled or failed business event once for each workflow that faulted and each work item pending for more than 24 hours, so your team hears about stuck approvals without looking for them. Runs: automatically every hour as a background process. Who looks after it: Integration administrator (the event's activation and endpoint, and the on-demand scan); System administrator (the background process itself, and the workflows it reports).

Purpose​

A workflow that faults, or an approval nobody acts on, stops the document behind it, and nobody may notice for days. A stalled approval is the absence of an action, which only a periodic scan can see. This process is that scan: it finds the open conditions and sends one business event for each, which you can route to Power Automate, Teams or your monitoring.

Each condition is reported once. It is reported again only when it changes (the work item is delegated, reassigned or moves to another step; the workflow faults again after a resume), or when it clears and later comes back.

Without it, the Workflow stalled or failed event is never raised: nothing else raises it.

When it runs​

  • Every hour. It is one process for the whole environment: the workflow tables are shared by every legal entity, and each condition is raised in the company of its document.
  • The database synchronization of a Lattice deployment registers it, and process automation must be initialized in the environment. There is no batch job for you to create.
  • It creates a batch job on every poll, even when there is nothing to report.
  • If the event is not activated in any legal entity, each run stops at once with the message "The workflow stalled or failed business event is not activated in any legal entity; nothing to scan."

Configuration and scheduling​

SettingWhereDefault
How often it runsSystem administration > Setup > Process automations, Background processes tab: select Lattice workflow stalled or failed alerts and choose Edit, then Repeat interval on the Execution parameters tabEvery hour
A time of day when it does not runThe same dialog, Sleep time period groupNot set by Lattice
How long a work item waits before it counts as stalledStall threshold (hours) on the dialog of Workflow stalled/failed alert scan, for a run you start yourself; the background process always uses the default24 hours
Where the alerts goThe standard Business events catalog: activate Workflow stalled or failed (category System administration) with your endpoint, in each legal entity whose workflows you want to hear aboutNot activated
Run the scan nowSystem administration > Periodic tasks > Lattice > Workflow stalled/failed alert scanNone

The background process takes no parameters, so it always uses 24 hours. The Process automations page is a standard page that only the System administrator role opens. Workflow stalled/failed alert scan needs the Integration administrator role and is refused while the license blocks Lattice; the background process is not stopped by the license.

A run from the menu with a different threshold shares the scan's memory with the background process: the scan with the longer threshold forgets the work items it does not count as stalled, and the next hourly run reports them again. Keep to one scan.

How it works​

  1. Check activation. If the event is not activated in any legal entity, stop.
  2. Find faulted workflows: every workflow instance whose tracking status is Faulted or Unrecoverable, however old.
  3. Find stalled work items: every work item that is Pending or Delegated and was created more than 24 hours before the scan started. The age counts from when the work item was created.
  4. For each condition, switch to the company of its document (the scan's own company when the workflow names none):
    • If the event is not activated in that company, skip it. It is neither sent nor remembered, so the first scan after you activate the event there reports it.
    • If it was already reported in the same state, skip it.
    • Otherwise send the event, then remember the condition and its state.
  5. Forget the conditions that are no longer open, so one that clears and later comes back is reported again.
  6. Summarize with "Workflow alert scan complete: n faulted instance(s) and n stalled work item(s) reported; n condition(s) no longer open."

What counts as the same state:

ConditionReported again when
Faulted workflowIts status changes, or it has a newer fault (resumed and faulted again)
Stalled work itemIts status, assigned user or step changes

Before it can run​

  • Process automation is initialized in the environment (System administration > Setup > Initialize process automations), and Lattice was deployed with a database synchronization, which registers the process.
  • A batch server is running.
  • The business events framework is on, and Workflow stalled or failed is activated with an endpoint in each legal entity whose workflows you want to hear about. See I want to activate a business event and send it to an endpoint.

Inputs and outputs​

ReadsChanges or creates
Workflow instances that are Faulted or Unrecoverable, with their latest faultOne Workflow stalled or failed business event per new or changed condition
Work items that are Pending or Delegated, with their workflow and stepThe scan's memory of what it reported (no page or entity shows it)
The event's activation in each legal entityNothing in the workflows: it never resumes, cancels or reassigns anything

The event carries the alert reason (Faulted, Unrecoverable or Stalled), the workflow ID and name, the legal entity, the document table and record, the step, the assigned user, the age in hours and a readable detail line. The event page lists every field.

Monitoring and logs​

  • Your endpoint: each alert arrives there. The process keeps no log of what it sent.
  • Process automations, View most recent results: "Lattice workflow stalled or failed alerts finished.", or "Lattice workflow stalled or failed alerts failed. The messages below give the reason; the process runs again at its next interval." with the messages.
  • System administration > Inquiries > Batch jobs: a job named Lattice workflow stalled or failed alerts every hour; its log holds the scan summary or the "not activated" message.

When it fails​

A run that fails as a whole is recorded as failed in the process results and runs again at the next interval. A condition is remembered only after its event was sent, so a condition whose send failed is reported by a later run; the conditions sent before the failure are not sent again.

SymptomCauseFix
The batch job log says "The workflow stalled or failed business event is not activated in any legal entity; nothing to scan."The event is not activated anywhereActivate Workflow stalled or failed in the legal entities you want, with an endpoint.
Alerts arrive for some legal entities and not othersThe event is activated only in someActivate it in the others; their open conditions are reported at the next run.
A stalled work item was reported twice without changingA second scan with another threshold (a run from the menu, or a scheduled copy) made the scans forget each other's itemsRun only the background process; use the menu with the default 24 hours, or not at all.
A work item is reported less than 24 hours after it reached its current userThe age counts from when the work item was created, and a new assigned user counts as a changeNothing is wrong: read Age Hours and Assigned User in the alert.
View most recent results shows a failed run with a business events errorPublishing one of the events failedFix the cause the messages give; the conditions that were not sent are reported at the next run.

Effect on the rest of Lattice​

  • It only reads the standard workflow tables and sends events: it does not change any workflow or document.
  • On a system with many open work items, each hourly run reads them all; only new or changed conditions are sent.
  • The Lattice workflow service operations do not depend on it. Fix a faulted workflow in the standard workflow pages, then resume it; the scan forgets the condition once the workflow is no longer faulted.