spec: a create-from on the process-step axis, and an opt-in append cardinality - #39
Open
delchev wants to merge 1 commit into
Open
spec: a create-from on the process-step axis, and an opt-in append cardinality#39delchev wants to merge 1 commit into
delchev wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
proposals/0021-generates-step-axis-and-append.md. Noversions/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/postsare idempotent per source,rollups/aggregatesrecompute an existing row and never insert, and an event-drivengeneratescreate-from is at-most-once by construction. What remains is a hand-written listener, or anoutbound→inboundloopback 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
generatesevent:map:onStepReached/onStepCompleted: { process, step }, narrowed by one rule of its own: the process must run on thefrom:entity, since the step event is about the record its process runs on and that record is the one the create-from reads;mode:—once(default, today's behaviour) orappend(one target per delivered event).The back-reference stays required in both cardinalities — the dedup key under
once, the created row's provenance underappend.What it deliberately does not claim
appendis 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 onmode: 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.