Skip to content

spec: a create-from on the process-step axis, and an opt-in append cardinality - #39

Open
delchev wants to merge 1 commit into
mainfrom
spec/generates-step-append
Open

spec: a create-from on the process-step axis, and an opt-in append cardinality#39
delchev wants to merge 1 commit into
mainfrom
spec/generates-step-append

Conversation

@delchev

@delchev delchev commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Adds proposals/0021-generates-step-axis-and-append.md. No versions/ file is touched — per the proposal-first process, a version document is written once at a release and folded from accepted proposals.

The gap

"On event E, append a derived row" — a log entry per workflow step, a protocol line per status change, an activity record per delivery — has no expression today. Every event-driven construct answers a different question: postings/posts are idempotent per source, rollups/aggregates recompute an existing row and never insert, and an event-driven generates create-from is at-most-once by construction. What remains is a hand-written listener, or an outboundinbound loopback whose only purpose is to defeat the guard.

Separately, an event-driven create-from binds only to the source's own lifecycle, while notifications, integrations and departures bind to the lifecycle or a process step — so a follow-up document that belongs to a moment in a flow has no trigger to hang off.

The proposal

Two additions to the generates event: map:

  1. the step axisonStepReached / onStepCompleted: { process, step }, narrowed by one rule of its own: the process must run on the from: entity, since the step event is about the record its process runs on and that record is the one the create-from reads;
  2. mode:once (default, today's behaviour) or append (one target per delivered event).

The back-reference stays required in both cardinalities — the dedup key under once, the created row's provenance under append.

What it deliberately does not claim

append is the absence of a guard, not a state-aware one. Delivery is at-least-once, so a redelivery appends a duplicate row, and "the target was voided, make another" is not what this cardinality expresses — that needs a state-aware predicate on mode: once. The proposal says so in the edge rules and again in the specification text, because the two are easy to confuse.

Implementation tracking: eclipse-dirigible/dirigible#6800.

…rdinality

Proposal 0021. "On event E, append a derived row" - a log entry per step, a
protocol line per transition - is not expressible: postings/posts are idempotent
per source, rollups/aggregates never insert, and an event-driven create-from is
at-most-once by construction. Two additions to the generates event map close it:
the process-step binding the rest of the event axis already uses, and mode:
once|append.

The proposal keeps the back-reference required in both cardinalities (dedup key
under once, provenance under append) and states plainly that append is the
absence of a guard rather than a state-aware one - a redelivery appends a
duplicate, and a voided target's replacement is not what it expresses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant