Skip to content

Do

Name Mandatory Description Default Type
⬅️ Input Any input type is accepted. The input of this shard will be given as input for the specified Wire Any
Output ➡️ The output of this shard will be the output of the Wire that is executed. Any
Wire No The Wire to execute inline. none WireStringNone

Schedules and executes the specified Wire inline of the current Wire. The specified Wire needs to complete its execution before the current Wire continues its execution. This means that a pause in execution of the child Wire will also pause the parent Wire.

Details

The child wire scheduled inherits and uses the context variables of the parent wire. Any changes to said variables will also be reflected on the parent wire.

Child wire is scheduled and executes inline. Any pauses on the child wire will also pause the parent wire.

Child wire is scheduled on the same mesh as the parent wire.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
@wire(hello {
  Pause(2.0)
  Msg("Hello")
})

@wire(main-wire {
  Msg("Start")
  Do(hello) ; ;hello is run inline. Start is logged, then 2s passes, and then Hello followed by End is logged.
  Msg("End")
})


@mesh(main)
@schedule(main main-wire)
@run(main)