Runic.Workflow.Conjunction (Runic v0.1.0-alpha.7)

Copy Markdown View Source

Logical AND gate that requires all referenced conditions to be satisfied.

A Conjunction holds condition_hashes (a MapSet of resolved condition hashes) and optionally condition_refs (a list of named condition references that are resolved at connect-time when the rule is added to a workflow).

Summary

Functions

Creates a conjunction from a list of condition structs.

Creates a conjunction from inline condition hashes and named condition refs.

Functions

new(conditions)

Creates a conjunction from a list of condition structs.

This is the original constructor used by existing rule compilation.

new(inline_hashes, condition_refs)

Creates a conjunction from inline condition hashes and named condition refs.

The hash is computed from a sorted list of {:hash, int} | {:ref, atom} tuples, making it stable at compile-time even when refs are not yet resolved.

At connect-time, condition_hashes is populated with resolved hashes.