<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2004/02/skos/core#Concept> .
<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://ontology.pflow.xyz/ns#NetPattern> .
<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/2004/02/skos/core#altLabel> "compensating transaction"@en .
<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/2004/02/skos/core#altLabel> "compensation"@en .
<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/2004/02/skos/core#altLabel> "must be reversed if it fails"@en .
<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/2004/02/skos/core#altLabel> "refund"@en .
<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/2004/02/skos/core#altLabel> "rollback"@en .
<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/2004/02/skos/core#altLabel> "undo on failure"@en .
<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/2004/02/skos/core#definition> "An ordered list of steps, each paired with a compensation. One control token walks the steps forward; a failure hands it to a chain that runs the compensations in reverse. Steps move tokens between accounts and the compensation moves them back."@en .
<https://ontology.pflow.xyz/pattern/saga> <http://www.w3.org/2004/02/skos/core#prefLabel> "Saga"@en .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#caveat> "A refund is the compensation of a step that moved tokens. It runs when a later step fails or when the final acknowledgement fails (fail_commit compensates every step, including the last). A step that fails itself moved nothing, so there is nothing to refund." .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#caveat> "A saga with a shared account is not closed, so it declares no conservation constraint of its own; the law is a property of the composite." .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#caveat> "One saga is one case: the control token is consumed once. Handling many orders takes one saga subnet per order, or a model that carries case identity; this pattern does not." .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#caveat> "Saga needs weighted arcs, so it exists only on the metamodel layer." .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#caveat> "The account ports are tagged `account`; a ResourcePool's are tagged `resource`. A port-to-port token link between them is rejected (E_SCHEMA_MISMATCH). The saga tests link a shared account to a plain place with no port, which skips the tag check." .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#caveat> "The net kind is ResourceNet, so nothing in the legality matrix stops a token link on a control place. Only the account ports are meant for token links." .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#caveat> "completed and rolled_back are out-ports on places. No port fires on 'either outcome', so a transition that must happen on both (for example releasing a worker) cannot be fused with one port." .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#composesWith> <https://ontology.pflow.xyz/pattern/queue> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#composesWith> <https://ontology.pflow.xyz/pattern/resource-pool> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#composesWith> <https://ontology.pflow.xyz/pattern/saga> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#composesWith> <https://ontology.pflow.xyz/pattern/state-machine> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#compositionLayer> <https://ontology.pflow.xyz/ns#MetamodelLayer> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#constructor> "saga.New(id) with Account, SharedAccount, Step, Move, Compensate, MustBuild or BuildValidated, then (*Saga).ToMetaSubnet()" .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasInvariant> <https://ontology.pflow.xyz/pattern/saga-inv-conservation> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasInvariant> <https://ontology.pflow.xyz/pattern/saga-inv-control> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasInvariant> <https://ontology.pflow.xyz/pattern/saga-inv-step> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasParameter> <https://ontology.pflow.xyz/pattern/saga-param-accounts> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasParameter> <https://ontology.pflow.xyz/pattern/saga-param-id> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasParameter> <https://ontology.pflow.xyz/pattern/saga-param-steps> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasPort> <https://ontology.pflow.xyz/pattern/saga-port-account> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasPort> <https://ontology.pflow.xyz/pattern/saga-port-commit> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasPort> <https://ontology.pflow.xyz/pattern/saga-port-completed> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasPort> <https://ontology.pflow.xyz/pattern/saga-port-do> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasPort> <https://ontology.pflow.xyz/pattern/saga-port-fail-commit> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasPort> <https://ontology.pflow.xyz/pattern/saga-port-fail> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasPort> <https://ontology.pflow.xyz/pattern/saga-port-rolled-back> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#hasPort> <https://ontology.pflow.xyz/pattern/saga-port-undo> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#intent> "a multi-step business transaction where, if a later step fails, the earlier ones must be undone"@en .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#netKind> "ResourceNet" .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#providedBy> <https://ontology.pflow.xyz/component/go-pflow/saga> .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#sourceFile> "saga/metasubnet.go" .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#sourceFile> "saga/saga.go" .
<https://ontology.pflow.xyz/pattern/saga> <https://ontology.pflow.xyz/ns#sourceRevision> "go-pflow origin/main 69257b3" .
