25.4.5 Understanding Task and Workflow Purging

Plan for workflow and task purging by storing any permanent history in application tables.

The APEX platform manages the workflow and task instances for all workspaces. To avoid unbounded storage requirements, a daily job enforces the retention period your instance administrator's configures for completed tasks and workflows.

The default retention period defaults to 7 days for tasks and 30 days for workflows. The administrator can extend these up to 30 days for tasks and up to 100 days for workflows. Any completed instances beyond the retention period get archived, then purged.

Tip:

Any errored or canceled tasks are archived and removed daily. They don't have a retention period.

Given this platform policy, evaluate if any aspect of your workflow and task instance information needs to be recorded permanently in a table in your application data model. If so, some approaches to consider include:
  • A task action on the Complete event can store key info in application tables
  • A workflow activity can store key info in application tables at any time
  • An automation can transfer key info to application tables by querying appropriate dictionary views.