Resume
| 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 |
Wire |
No |
The Wire to resume. |
none |
WireStringNoneVar(Wire) |
Resumes another Wire (previously paused using Suspend).
Examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 | @wire(add-progress {
Once({
progress-stat | Math.Add(1.0) > progress-stat
} 1.0)
progress-stat
When(Predicate: Is(5.0) Action: {; ; add progress will suspend once progress-stat reaches 5
Once({
Suspend
})
})
} Looped: true)
@wire(main-wire {
Once({; ; initialize variables and detach the add-progress wire
0.0 | Set(progress-stat Global: true)
0.0 | Set(resume-timer)
Detach(add-progress)
})
Once({
progress-stat
Log("Progress")
resume-timer | Math.Add(1.0) > resume-timer
Log("Resume Timer")
} 1.0)
resume-timer
When(Predicate: Is(10.0) Action: {
Resume(add-progress) ; ;When resume-timer reaches 10, it will Resume add-progress wire which was previously suspended
})
} Looped: true)
@mesh(main)
@schedule(main main-wire)
@run(main)
|