Skip to content
Operate

Message storage

Choose what each workflow stores for a successful message, and remove message content after a set number of days while the run records stay. What replay can and can't do in each case.

On this page

By default the engine stores every message in full: the message as it arrived and the output of every step. That is what makes the message inspector, replay and Edit & resend work on any run. At high volume it is also most of the database's size.

Each workflow has two settings that store less. Both are on the workflow's Settings tab, under Data, in the Message storage card. Only admins can change them, and every change is recorded in the audit log.

  • Storage mode chooses what a successful message keeps once its run ends.
  • Content retention removes message content after a number of days, and keeps the run record (status, times, ACK, errors and search fields) until execution retention deletes it.

Storage modes

ModeA successful message keepsReplay and Edit & resendInspector
Full (default)The message and every step's outputWorkEverything
ProductionThe message, the outputs of send steps and of the last step on each path, and errorsWork: they run from the messageNo output for intermediate steps (filters, maps)
RawThe message onlyWork: they run from the messageThe message, no step outputs
Metadata onlyNo content: status, times, ACK, errors, sizes and search fieldsNot possibleA note that the content was not stored

These rules hold in every mode:

  • Failed, partial and cancelled runs keep everything. Needs action, replay, Edit & resend and automatic retries all work on them as before.
  • Content is removed only after the run ends. A run that is still in progress, waiting or retrying keeps what it needs.
  • A step the trigger answers from (a webhook or SOAP trigger set to respond from a destination), a Respond step, and the step a called workflow returns keep their output, so responses still work.
  • A workflow with a queued destination stores its runs in full whatever the mode, because a queued send resumes from the run's step outputs. The card says so.
  • Search by control id, MRN, sender, message type and correlation id still finds every message, because those fields are stored apart from the content.
  • Encrypted workflows work the same way: what is kept stays encrypted.

The mode applies to messages that finish after you save it. It does not change runs already stored. To remove older content, use content retention.

Content retention

Set Remove message content after to a number of days (7 to 3650). Every 6 hours the retention sweep removes the message and step outputs of runs older than that, and keeps the run records. Execution retention deletes the records later, as usual. Choose Keep content with the run to turn it off.

  • Failed and partial runs keep their content as long as Keep failed executions for, when that is longer.
  • Runs in progress are never touched, and runs covered by a legal hold keep their content.
  • With an execution archive set up (EXECUTION_ARCHIVE_DIR), each batch is archived before its content is removed. See Back up and restore.
  • Each batch writes an execution.content_pruned audit event per workspace, with counts and dates only.
  • The minimum is 7 days, so nothing in Needs action loses its content.
  • A period at or past the workflow's execution retention has no effect, and the card says so. It is allowed, as in other integration engines.

Once a message's content is removed, the inspector says when and why, and a replay answers 409 with the code CONTENT_NOT_STORED instead of sending an empty message.

API

GET /api/workflows/{id}/retention returns storageMode, contentRetentionDays and queuedDestinations with the retention settings. PUT the same path with any of them:

json
{ "storageMode": "production", "contentRetentionDays": 30 }

storageMode is full, production, raw or metadata. contentRetentionDays is a whole number of days or null. A change is audited as workflow.retention_changed with the old and new values.

Reference

  • Back up and restore: execution retention, keep failed executions, the execution archive
  • Audit log: workflow.retention_changed, execution.content_pruned