Skip to content

Branch

Name Mandatory Description Default Type
⬅️ Input Any input type is accepted. The input value will pass through unchanged. Any
Output ➡️ Outputs the input value, passed through unchanged. Any
Wires No The Wires to schedule and run on this branch. none Wire[Wire]None
FailureBehavior No The policy to take when some of the Wires running on this branch fail. BranchFailure::Everything BranchFailure
CaptureAll No If all of the existing variables should be copied onto the branch created, regardless if they are used or not. false Bool
Mesh No The Behavior to branch from. If none provided, it will branch from the Behavior that the current Wire is on. Mesh 0x0000021008572B30 NoneMesh

Creates a branch from the specified Behavior and schedules all the Wires specified. Every time this shard is called, it will progress the state of all the Wires specified asynchronously and continue execution of the current Wire. This shard is like a mass Step, where it Steps all the Wires specified.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
@wire(c1 {
  msg1 | Log
})

@wire(c2 {
  msg2 | Log
})

@wire(branch {
  "Hello" = msg1
  "World" = msg2
  Branch([c1 c2])
})

Do(branch)

[info] [c1] Hello
[info] [c2] World