procedure
procedure
#
Procedure operator procedures perform meta-operations on other procedures.
ProcedureEqual compares two results; ProcedureOr provides fallback.
Whether a procedure produced a value is asked with ProcedureCompleted (the
basis of path.exists()); conditionality is otherwise expressed with data
dependencies and cg.do_optional().
ProcedureEqual
#
Compare two procedures, returning true if their results are equal.
Evaluates both procedures and returns true if their results are equivalent, false otherwise. Useful for validation and conditional logic based on procedure outputs.
Attributes:
| Name | Type | Description |
|---|---|---|
left |
Input[CGType]
|
The first procedure to compare. |
right |
Input[CGType]
|
The second procedure to compare. |
Source code in capturegraph-lib/capturegraph/procedures/nodes/process/operators/procedure.py
ProcedureOr
#
Bases: Procedure[T]
Return the result of the first procedure, or the second if the first fails.
Attempts the primary procedure first; if it fails or returns null, the
fallback runs instead. Both procedures must return the same type T.
Attributes:
| Name | Type | Description |
|---|---|---|
primary |
Input[T]
|
The procedure to attempt first. |
fallback |
Input[T]
|
The procedure to use if |