Conditions
Put rules on edges so one event routes to different branches.
Branching lives on the edge, not on a separate node. Any edge can carry conditions, and the edge fires only when they pass. To branch, point several edges out of one node and give each its own conditions. A single event then routes to whichever branch matches: an edge whose conditions read category == "bug" sends bugs one way, an edge reading category == "feature" sends features another.
An edge with no conditions always fires. Use it as the default branch that catches anything the other edges did not match.
Rules
A rule compares one value against another:
{
"kind": "rule",
"left": "{{ai_categorize.category}}",
"op": "==",
"right": "bug"
}left is a {{slug.field}} reference into the run context. op is the comparison. right is a literal (string, number, or boolean), omitted for the emptiness checks.
| Operator | Meaning |
|---|---|
== != | equals, not equals |
< <= > >= | numeric comparison |
contains not_contains | substring or membership |
starts_with ends_with | string prefix or suffix |
is_empty is_not_empty | presence, no right-hand value |
Groups
Combine rules with a group. A group joins its items with and or or, and groups nest, so you can express any And/Or logic:
{
"kind": "group",
"conj": "and",
"items": [
{ "kind": "rule", "left": "{{order.total}}", "op": ">", "right": 100 },
{
"kind": "group",
"conj": "or",
"items": [
{
"kind": "rule",
"left": "{{order.country}}",
"op": "==",
"right": "BR"
},
{
"kind": "rule",
"left": "{{order.country}}",
"op": "==",
"right": "PT"
}
]
}
]
}That edge fires when the order is over 100 and ships to Brazil or Portugal. On the canvas you build this as nested groups. The JSON above is what it compiles to.
