Skip to content

CAP-PFM-INT-020Publish event-driven automation and follow its work

Markdown

CAP-PFM-INT-020

Publish event-driven automation and follow its work

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationPartially observed

KindCapabilityProduct areaPlatformModuleIntegration access, customer extensions and shared workflow configurationRevision1

Read atservices-platform ad3f6a65macroservice-libraries 54536a44

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
A run refers to the published version responsible for its actions.Shared lists make application runs and timers inspectable together.
Surfaces
apijob
Intent sources
services-platform:docs/proposals/application-processes-and-workflow-actions/14-decisions.md#D-10services-platform:docs/proposals/application-processes-and-workflow-actions/14-decisions.md#D-03

Controls

37 controls apply, from the corpus control catalogue.

TC-AVL-004 TC-AVL-005 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-CHG-001 TC-CHG-002 TC-CHG-003 TC-CHG-004 TC-CHG-005 TC-CHG-006 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 TC-IAM-001 TC-IAM-006 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-MON-001 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-TEN-004 TC-VEN-001 TC-VEN-002 TC-VEN-003

Permissions

KeyChecked atScope
platform.workflow-actions.automation-manageapitenant
platform.workflow-actions.registry-readapitenant
platform.workflow-actions.runs-readapitenant
platform.workflow-actions.runs-resolveservicetenant

Business Rules

9 rules, 8 to be proved before approval. A rule's product intent is derived from its origin: 4 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Confirmed
Creation gives an automation rule and its first version draft status under the event owner; name and event can change before first publication, while the event is fixed afterwards.
lifecycleservicetest
services-platform:modules/workflow-actions/tests/integration/services/persistence/automation-rules.integration.spec.js#creates the rule as a draft, owned by the event’s application, with its first version as the draft
02must prove
Proposed
A rule has one editable draft version, and saving after publication opens the next numbered draft.
invariantservice, databasetest
03must prove
Confirmed
Publishing requires a registered automation event, declared condition facts, at least one registry-valid action at that event and all automation and action permissions, storing those permissions with the version.
validationservicetest
04must prove
Proposed
Publication freezes the condition, actions and fingerprint with publisher and time, selects the current version and enables a draft rule; subsequent content changes are refused even for direct writers.
invariantservice, databasetest
05must prove
Confirmed
Enabled and disabled rules may exchange states, any non-retired rule may retire, drafts enable only through publication and retired rules cannot move; published rules cannot be deleted but unpublished drafts can.
lifecycleservicetest
06must prove
Confirmed
The event owner evaluates at most two hundred enabled rules at their current published versions and raises matching actions in its own transaction with rule and version attribution.
policyservicetest
macroservice-libraries:packages/workflow-actions/src/tests/integration/automation.integration.spec.ts#raises each matching rule’s actions as platform.automation_rule, rule and version, at event, once per event
07must prove
Proposed
Shared run and timer lists filter application, host, instance, status, type and time, order runs newest first and timers by due time, identify failed or blocked work and skip unavailable host views with a warning.
policyservicetest
08
Proposed
The shared runs-resolve permission governs host-owned retry and skip operations on each host’s routes.
permissionservicedocumented
09must prove
Proposed
Registry read covers rules and versions, automation manage covers edits and publication and runs read covers run and timer lists.
permissionapitest

Scenarios

IdGivenWhenThenProvenance
01Accounting declares the overdue-invoice event.Staff publish a rule creating a task and sending e-mail for that event.Publication enables the first version and later runs identify that version.test
services-platform:modules/workflow-actions/tests/e2e/workflow-actions.e2e.spec.js#publishes it, enabled, with the version as its current one

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.