Procedure
A Procedure models a documented procedure as a typed flowchart built from a closed set of ProcedureNode kinds. Procedures are non-mergeable: see Merging — Procedure merging for how Scope.procedures resolves conflicts on merge, and Domain Model — Procedures for a conceptual overview of the node kinds.
Procedure
Procedure
Bases: MergeableModel
A documented procedure modelled as a typed, internally-consistent flowchart.
Procedures are non-mergeable: when attached to a Scope and two Scopes are
merged, the child's Procedure replaces the parent's wholesale on id
conflict rather than being merged field-by-field or node-by-node.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Non-empty identifier of this procedure, used as the merge key when Procedures from different Scopes share the same id. |
description |
str
|
Non-empty description of the procedure's purpose. |
nodes |
frozenset[ProcedureNode]
|
The flowchart's nodes. Each node id must be unique within the
procedure, and every node it points to (via |
ProcedureNode
ProcedureNode = Annotated[StartTerminatorNode | EndTerminatorNode | ActivityNode | DecisionNode | InputNode | OutputNode | PredefinedProcedureNode | ManualOperationNode | ManualInputNode | ForkNode | SyncNode, Field(discriminator='kind')]
module-attribute
StartTerminatorNode
StartTerminatorNode
Bases: _NodeBase
The entry point of a procedure (or one of its parallel entry points).
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['start']
|
Discriminator field, always |
next |
str
|
Id of the node to execute first. |
EndTerminatorNode
EndTerminatorNode
Bases: _NodeBase
A terminal point of a procedure; execution stops here.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['end']
|
Discriminator field, always |
ActivityNode
ActivityNode
Bases: _NodeBase
A standard automated or manual processing step.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['activity']
|
Discriminator field, always |
next |
str
|
Id of the node to follow. |
DecisionNode
DecisionNode
Bases: _NodeBase
A branching point selecting among multiple possible next nodes.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['decision']
|
Discriminator field, always |
cases |
frozenset[DecisionCase]
|
The possible branches, each pairing a case label with the node id to follow. Case labels must be unique within the node. |
DecisionCase
DecisionCase
Bases: BaseModel
A binding that pairs a decision's case label with the node id to follow.
Attributes:
| Name | Type | Description |
|---|---|---|
case |
str
|
Non-empty label identifying the branch condition. |
next |
str
|
Id of the node to follow when this case applies. |
InputNode
InputNode
Bases: _NodeBase
A step that captures data entering the procedure.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['input']
|
Discriminator field, always |
next |
str
|
Id of the node to follow. |
OutputNode
OutputNode
Bases: _NodeBase
A step that produces data leaving the procedure.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['output']
|
Discriminator field, always |
next |
str
|
Id of the node to follow. |
PredefinedProcedureNode
PredefinedProcedureNode
Bases: _NodeBase
A call to another, separately documented Procedure.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['predefined_procedure']
|
Discriminator field, always |
procedure_id |
str
|
Id of the Procedure being invoked. |
next |
str
|
Id of the node to follow once the call returns. |
ManualOperationNode
ManualOperationNode
Bases: _NodeBase
A step performed manually outside of any system.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['manual_operation']
|
Discriminator field, always |
next |
str
|
Id of the node to follow. |
ManualInputNode
ManualInputNode
Bases: _NodeBase
A step in which data is manually entered.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['manual_input']
|
Discriminator field, always |
next |
str
|
Id of the node to follow. |
ForkNode
ForkNode
Bases: _NodeBase
A point that splits execution into parallel branches.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['fork']
|
Discriminator field, always |
branches |
frozenset[str]
|
Ids of the nodes starting each parallel branch. |
SyncNode
SyncNode
Bases: _NodeBase
A point where parallel branches converge before continuing.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['sync']
|
Discriminator field, always |
next |
str
|
Id of the node to follow once every branch has converged. |
RasciAssignment
RasciAssignment
Bases: BaseModel
A binding that associates a role name with its RASCI responsibility level.
Attributes:
| Name | Type | Description |
|---|---|---|
role |
str
|
Non-empty name of the role holding this responsibility. |
level |
RASCILevel
|
The RASCI responsibility level held by the role. |