# Runic v0.1.0-alpha.7 - Table of Contents Powerful workflow graph composition and runtime for Elixir ## Pages - [Runic](readme.md) - Guides - [Runic Cheatsheet](cheatsheet.md) - [Runic Usage Rules](usage-rules.md) - [Runic Protocols](protocols.md) - [Building a Workflow Scheduler](scheduling.md) - [Durable Execution and Persistence](durable-execution.md) - [Execution Strategies](execution-strategies.md) - [State-Based Components](state-based-components.md) ## Modules - [Runic.Runner.Scheduler.Adaptive](Runic.Runner.Scheduler.Adaptive.md): Self-tuning scheduler that adjusts dispatch strategy based on runtime profiling. - [Runic.Runner.Scheduler.Adaptive.Capability](Runic.Runner.Scheduler.Adaptive.Capability.md): A registered dispatch capability that the Adaptive scheduler can assign to nodes. - [Runic.Runner.Scheduler.Adaptive.NodeProfile](Runic.Runner.Scheduler.Adaptive.NodeProfile.md): Per-node execution statistics tracked by the Adaptive scheduler. - [Runic.Workflow.Activator](Runic.Workflow.Activator.md): Optional protocol for nodes with custom downstream activation patterns. - [Runic.Workflow.CausalContext](Runic.Workflow.CausalContext.md): Minimal immutable context for executing a runnable without the full workflow. - [Runic.Workflow.CompilationUtils](Runic.Workflow.CompilationUtils.md): Macro utilities for compiling expressions into workflow graphs or components. - [Runic.Workflow.ComponentAdded](Runic.Workflow.ComponentAdded.md) - [Runic.Workflow.ConditionRef](Runic.Workflow.ConditionRef.md): A lightweight compile-time placeholder for referencing named conditions in rule `where` clauses. - [Runic.Workflow.Conjunction](Runic.Workflow.Conjunction.md): Logical AND gate that requires all referenced conditions to be satisfied. - [Runic.Workflow.Coordinator](Runic.Workflow.Coordinator.md): Optional protocol for nodes that need post-fold coordination. - [Runic.Workflow.EventApplicator](Runic.Workflow.EventApplicator.md): Protocol for applying custom events to a workflow. - [Runic.Workflow.Events](Runic.Workflow.Events.md): Barrel module for all workflow event types. - [Runic.Workflow.Events.ActivationConsumed](Runic.Workflow.Events.ActivationConsumed.md): Event emitted when a node consumes its activation edge (marks it as :ran). - [Runic.Workflow.Events.ConditionSatisfied](Runic.Workflow.Events.ConditionSatisfied.md): Event emitted when a condition (or conjunction) is satisfied by a fact. - [Runic.Workflow.Events.FactProduced](Runic.Workflow.Events.FactProduced.md): Event emitted when a fact is produced during workflow execution. - [Runic.Workflow.Events.FanInCompleted](Runic.Workflow.Events.FanInCompleted.md): Event derived during `maybe_finalize_coordination/2` when a FanIn node determines that all expected fan-out items have been processed. - [Runic.Workflow.Events.FanOutFactEmitted](Runic.Workflow.Events.FanOutFactEmitted.md): Event emitted when a FanOut node splits an enumerable input into individual facts. - [Runic.Workflow.Events.JoinCompleted](Runic.Workflow.Events.JoinCompleted.md): Derived event emitted when a Join node has all required branches satisfied. - [Runic.Workflow.Events.JoinEdgeRelabeled](Runic.Workflow.Events.JoinEdgeRelabeled.md): Derived event emitted when a join edge is relabeled upon join completion. - [Runic.Workflow.Events.JoinFactReceived](Runic.Workflow.Events.JoinFactReceived.md): Event emitted when a fact arrives at a Join node from a parent branch. - [Runic.Workflow.Events.MapReduceTracked](Runic.Workflow.Events.MapReduceTracked.md): Event emitted when a step in a fan-out pipeline tracks its result for downstream fan-in coordination. - [Runic.Workflow.Events.RunnableActivated](Runic.Workflow.Events.RunnableActivated.md): Event emitted when a downstream node is activated by a produced fact. - [Runic.Workflow.Events.Serializer](Runic.Workflow.Events.Serializer.md): Serialization utilities for workflow events. - [Runic.Workflow.Events.StateInitiated](Runic.Workflow.Events.StateInitiated.md): Event emitted when an accumulator initializes its state for the first time. - [Runic.Workflow.FactRef](Runic.Workflow.FactRef.md): A lightweight reference to a Fact without its value. - [Runic.Workflow.FactResolver](Runic.Workflow.FactResolver.md): Runtime resolver that hydrates `FactRef` structs via a Store adapter. - [Runic.Workflow.Facts](Runic.Workflow.Facts.md): Unified accessors for `Fact` and `FactRef` structs. - [Runic.Workflow.HookEvent](Runic.Workflow.HookEvent.md): Event struct passed to hooks during execution. - [Runic.Workflow.HookRunner](Runic.Workflow.HookRunner.md): Runs hooks during the execute phase without requiring workflow access. - [Runic.Workflow.ReactionOccurred](Runic.Workflow.ReactionOccurred.md) - [Runic.Workflow.Rehydration](Runic.Workflow.Rehydration.md): Lineage classification and hybrid rehydration for checkpointed workflows. - [Runic.Workflow.Root](Runic.Workflow.Root.md) - [Runic.Workflow.Serializer](Runic.Workflow.Serializer.md): Behaviour for workflow serialization to various graph formats. - [Runic.Workflow.Serializers.Cytoscape](Runic.Workflow.Serializers.Cytoscape.md): Serializes Runic Workflows to Cytoscape.js JSON element format. - [Runic.Workflow.Serializers.DOT](Runic.Workflow.Serializers.DOT.md): Serializes Runic Workflows to DOT (Graphviz) format. - [Runic.Workflow.Serializers.Edgelist](Runic.Workflow.Serializers.Edgelist.md): Serializes Runic Workflows to simple edgelist format. - [Runic.Workflow.Serializers.Mermaid](Runic.Workflow.Serializers.Mermaid.md): Serializes Runic Workflows to Mermaid diagram format. - Core - [Runic](Runic.md): - [Runic.Workflow](Runic.Workflow.md): Runtime evaluation engine for Runic workflows. - Components - [Runic.Workflow.Accumulator](Runic.Workflow.Accumulator.md): Accumulator components aggregate values over time using a reducer function. - [Runic.Workflow.Aggregate](Runic.Workflow.Aggregate.md): A CQRS/Event Sourcing aggregate component that validates commands, emits domain events, and folds events into state. - [Runic.Workflow.Condition](Runic.Workflow.Condition.md): Condition nodes are predicate checks that gate flow in a workflow. - [Runic.Workflow.FSM](Runic.Workflow.FSM.md): A finite state machine component with discrete named states and event-driven transitions. - [Runic.Workflow.Join](Runic.Workflow.Join.md) - [Runic.Workflow.Map](Runic.Workflow.Map.md): Map operations contain a FanOut operator and LambdaStep operations to produce facts split from the input and process each. - [Runic.Workflow.ProcessManager](Runic.Workflow.ProcessManager.md): An event-driven process orchestrator that coordinates across multiple aggregates. - [Runic.Workflow.Reduce](Runic.Workflow.Reduce.md): Component represention of a reduce operation to implement the component protocol for connecting a reduce to other components in a workflow. - [Runic.Workflow.Rule](Runic.Workflow.Rule.md) - [Runic.Workflow.Saga](Runic.Workflow.Saga.md): A sequential transaction pipeline with compensating actions for failure recovery. - [Runic.Workflow.StateMachine](Runic.Workflow.StateMachine.md): A stateful workflow component that combines an accumulator with reactive rules. - [Runic.Workflow.Step](Runic.Workflow.Step.md): Step nodes transform input facts into output facts. - Scheduling & Execution - [Runic.Workflow.PolicyDriver](Runic.Workflow.PolicyDriver.md): Executes a `%Runnable{}` according to a `%SchedulerPolicy{}`, handling retries, timeouts, backoff, fallbacks, and failure modes. - [Runic.Workflow.RunnableCompleted](Runic.Workflow.RunnableCompleted.md): Event recording that a runnable completed execution successfully. - [Runic.Workflow.RunnableDispatched](Runic.Workflow.RunnableDispatched.md): Event recording that a runnable was dispatched for execution. - [Runic.Workflow.RunnableFailed](Runic.Workflow.RunnableFailed.md): Event recording that a runnable failed permanently (retries exhausted). - [Runic.Workflow.SchedulerPolicy](Runic.Workflow.SchedulerPolicy.md): Defines per-node scheduling policies for workflow execution. - Runner - [Runic.Runner](Runic.Runner.md): Built-in workflow execution infrastructure. - [Runic.Runner.Executor](Runic.Runner.Executor.md): Behaviour for controlling how runnables are dispatched to compute. - [Runic.Runner.Executor.GenStage](Runic.Runner.Executor.GenStage.md): GenStage-based executor providing demand-driven dispatch with back-pressure. - [Runic.Runner.Executor.Task](Runic.Runner.Executor.Task.md): Default executor using `Task.Supervisor.async_nolink`. - [Runic.Runner.Promise](Runic.Runner.Promise.md): A batched execution unit that groups runnables for optimized dispatch. - [Runic.Runner.PromiseBuilder](Runic.Runner.PromiseBuilder.md): Analyzes workflow graphs to construct Promises from linear chain patterns. - [Runic.Runner.Scheduler](Runic.Runner.Scheduler.md): Behaviour for controlling what gets dispatched together and when. - [Runic.Runner.Scheduler.ChainBatching](Runic.Runner.Scheduler.ChainBatching.md): Scheduler strategy that batches linear chains into Promises. - [Runic.Runner.Scheduler.ContractTest](Runic.Runner.Scheduler.ContractTest.md): Conformance test suite for `Runic.Runner.Scheduler` behaviour implementations. - [Runic.Runner.Scheduler.Default](Runic.Runner.Scheduler.Default.md): Default scheduler strategy that dispatches each runnable individually. - [Runic.Runner.Scheduler.FlowBatch](Runic.Runner.Scheduler.FlowBatch.md): Scheduler strategy that detects both sequential chains and parallel batch opportunities. - [Runic.Runner.Store](Runic.Runner.Store.md): Behaviour for workflow persistence adapters. - [Runic.Runner.Store.ETS](Runic.Runner.Store.ETS.md): Default in-memory persistence adapter using ETS. - [Runic.Runner.Store.Mnesia](Runic.Runner.Store.Mnesia.md): Mnesia-backed persistence adapter for the Runner. - [Runic.Runner.Telemetry](Runic.Runner.Telemetry.md): Telemetry event definitions for Runic.Runner. - [Runic.Runner.Worker](Runic.Runner.Worker.md): GenServer managing a single workflow's execution lifecycle. - Protocols - [Runic.Component](Runic.Component.md): Protocol defining how Runic components compose together and connect within workflows. - [Runic.Transmutable](Runic.Transmutable.md): Protocol for converting data structures into Runic workflows or components. - [Runic.Workflow.Invokable](Runic.Workflow.Invokable.md): Protocol defining how workflow nodes execute within a workflow context. - Internal - [Runic.Closure](Runic.Closure.md): Serializable closure representation for Runic components. - [Runic.ClosureMetadata](Runic.ClosureMetadata.md): Serializable metadata for reconstructing closures from logs. - [Runic.Workflow.Components](Runic.Workflow.Components.md) - [Runic.Workflow.Fact](Runic.Workflow.Fact.md) - [Runic.Workflow.FanIn](Runic.Workflow.FanIn.md): FanIn steps are part of a reduce operator that combines multiple facts into a single fact by applying the reducer function to return the accumulator with the parent. - [Runic.Workflow.FanOut](Runic.Workflow.FanOut.md): FanOut steps are part of a map operator that expands enumerable facts into separate facts. - [Runic.Workflow.Runnable](Runic.Workflow.Runnable.md): A prepared unit of work ready for execution. - Exceptions - [Runic.IncompatiblePortError](Runic.IncompatiblePortError.md): Raised when connecting two components with incompatible port contracts. - [Runic.UnresolvedReferenceError](Runic.UnresolvedReferenceError.md): Raised when a component references another component that does not exist in the workflow.