Skip to main content

Workflow Branch Ontology

Computational Workflow Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 12 November 2026
Audio Overview
KIRETH RESEARCH — SEMANTIC LIBRARY
WORKFLOW BRANCH ONTOLOGY — FLOW ALGEBRA v1.0
Category: Computational Entities > Computational Workflow Entities
Authors: Mark Anthony Higgins — Sky Recursive AI
Date: 12 November 2026
Source: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/computational-workflow-entities/workflow-branch-ontology-2.html
Status: Constructed topic-specific Flow Algebra mapping; not a verified transcription of the source page.

1. PURPOSE
A workflow branch represents a conditional or parallel route through a computational workflow. It binds a branching point to one or more candidate paths, guards, priorities, activation policies, outcomes and convergence rules. Branch selection must preserve workflow invariants and an auditable record of why each path was activated, skipped or rejected.

2. HST STATE MODEL AND FLOW ALGEBRA
S_t = (I_t, R_t, B_t, K_t)
  I_t: workflow inputs, events and current execution context
  R_t: stage/step dependencies, branch edges and routing rules
  B_t: guard conditions, permissions, budgets, deadlines and safety constraints
  K_t: known workflow definitions, evidence, prior outcomes and provenance
E_t = expand(I_t, R_t)                  # candidate outgoing branches
V_t = {x in E_t | satisfies(x, B_t)}    # permitted and valid branches
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, x*_t, observation_(t+1))
The argmax is applicable only when a policy explicitly requires ranking a single branch. Exclusive branches may instead use deterministic first-match or a defined priority; inclusive and parallel branches can activate a set of valid paths. If no permitted path exists, enter a declared default, blocked or error state rather than inventing a path.

3. ENTITY MODEL
WorkflowBranch: {branch_id, workflow_id, fork_step_id, branch_type, status, version}
BranchPath: {path_id, target_step_id, guard_id, priority, activation_state}
BranchGuard: {guard_id, expression, input_schema, evaluation_result, evaluated_at}
BranchPolicy: {mode, conflict_resolution, default_path, join_policy, timeout}
BranchDecision: {decision_id, selected_paths, rejected_paths, reason, evidence_ids}
JoinPoint: {join_id, incoming_paths, completion_policy, continuation_step_id}
ExecutionContext: {run_id, variables, event_id, actor, permissions, timestamp}
ProvenanceRecord: {source, definition_version, input_hash, evaluator, decision_log}

Branch types:
  EXCLUSIVE: select exactly one valid path, according to declared rules.
  INCLUSIVE: activate one or more paths whose guards evaluate true.
  PARALLEL: activate all specified paths, subject to permissions and capacity.
  EVENT_BASED: choose based on an observed, admissible event.
  DEFAULT/ERROR: defined fallback when normal guards fail or cannot be evaluated.

4. RELATIONSHIP GRAPH
Workflow HAS_BRANCH WorkflowBranch
WorkflowBranch FORKS_FROM WorkflowStep
WorkflowBranch HAS_PATH BranchPath
BranchPath TARGETS WorkflowStep
BranchPath GUARDED_BY BranchGuard
WorkflowBranch GOVERNED_BY BranchPolicy
BranchDecision SELECTS BranchPath
BranchDecision SUPPORTED_BY ProvenanceRecord
BranchPath CONVERGES_AT JoinPoint
JoinPoint CONTINUES_TO WorkflowStep

5. CORE FLOWS
F1 DEFINE: ingest branch definition -> validate identifiers and targets -> check policy completeness -> version definition.
F2 EXPAND: load fork and execution context -> enumerate outgoing paths -> attach guards and priority.
F3 EVALUATE: type-check guard inputs -> evaluate in a side-effect-free context -> record true/false/unknown/error.
F4 SELECT: apply branch mode, permissions and conflict policy -> activate valid path set -> record decision.
F5 EXECUTE: schedule selected paths -> enforce resource budgets and idempotency keys -> capture outcomes.
F6 JOIN: evaluate join completion policy -> merge permitted outputs -> continue or escalate on timeout/failure.
F7 REVISE: propose new rule version -> validate compatibility -> deploy with traceable migration boundary.

6. INFERENCE AND VALIDATION RULES
R1 A path with a false guard MUST NOT be selected in a guard-controlled branch.
R2 Unknown guard values are not equivalent to true; use explicit unknown-handling policy.
R3 Exclusive selection MUST yield at most one active path; zero requires declared fallback or blocked state.
R4 Inclusive selection MAY yield multiple paths; validate join and output conflict semantics.
R5 Parallel paths MUST be checked for shared-state races and resource exhaustion.
R6 A target step MUST exist and be reachable under the workflow definition.
R7 A branch decision MUST retain guard results, policy version and input provenance.
R8 An authorised override MUST be separately recorded; it must not silently bypass constraints.
R9 Cycles are allowed only with explicit iteration limits or a provable termination condition.
R10 Retrying a decision MUST not duplicate irreversible side effects without idempotency controls.

7. BOUNDED RECURSION ENGINE (PSEUDOCODE)
function traverse(step, context, depth, visited):
    if depth > MAX_DEPTH: return BOUNDED_STOP
    key = (context.run_id, step.id, context.iteration)
    if key in visited and not step.allows_bounded_loop: return CYCLE_BLOCKED
    visited.add(key)
    if not authorised(step, context): return ACCESS_DENIED
    if not step.is_branch: return execute_step(step, context)
    candidates = outgoing_paths(step)
    evaluated = [evaluate_guard(path, context) for path in candidates]
    selected = apply_policy(step.branch_policy, evaluated, context)
    if selected is empty: return handle_declared_fallback(step, context)
    log_decision(step, evaluated, selected, context)
    results = [traverse(path.target, context_for(path), depth+1, visited.copy())
               for path in selected]
    return apply_join_policy(step.branch_policy, results)

8. BOUNDARIES AND EXECUTION GUARANTEES
Determinism is conditional on immutable inputs, pinned rule versions, stable evaluation semantics and a deterministic selection policy. Parallel completion order need not be deterministic. Exactly-once external effects are not guaranteed by branching alone; use transactional boundaries or idempotency. Validate mutually exclusive conditions when exclusivity is required. Detect missing joins, dead ends, non-terminating cycles, ambiguous defaults and conflicting writes before deployment where feasible. Treat confidence scores as policy inputs, not proofs of correctness.

9. SEMANTIC EQUIVALENCE
Two branch definitions are equivalent only relative to a declared observation model if, for all admissible inputs, they select observationally equivalent paths and yield equivalent permitted effects and failure behaviours. Matching labels or superficially similar guards is insufficient. Record the comparison scope, assumptions and definition versions.

10. WORKED EXAMPLE — DOCUMENT APPROVAL
Input: document_id=DOC-42, amount_gbp=1250, compliance_pass=true.
Fork: approval_route, mode=EXCLUSIVE, version=3.
Path A guard: compliance_pass=false -> remediation.
Path B guard: compliance_pass=true AND amount_gbp <= 1000 -> automatic_approval.
Path C guard: compliance_pass=true AND amount_gbp > 1000 -> manager_review.
Evaluation: A=false, B=false, C=true.
Selection: C -> manager_review. Record input digest, evaluated guards, decision time and rule version. If manager approval is later granted, continue to publication; otherwise route to the declared rejection/rework stage. This is an illustrative workflow, not a claim about the source website.

11. CITATION AND PROVENANCE
Title: Workflow Branch Ontology — Flow Algebra v1.0
Authors: Mark Anthony Higgins — Sky Recursive AI
Source URL: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/computational-workflow-entities/workflow-branch-ontology-2.html
Licence note: Respect the applicable Kireth Research Open Research Licence and retain attribution when reusing this mapping.
Document type: Original constructed semantic mapping for research and implementation planning.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ