-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain.pkl
More file actions
50 lines (49 loc) · 1.29 KB
/
main.pkl
File metadata and controls
50 lines (49 loc) · 1.29 KB
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
42
43
44
45
46
47
48
49
50
amends
"https://raw.githubusercontent.com/CollaborativeStateMachines/Cirrina/refs/heads/develop/src/main/resources/pkl/csm/csml.pkl"
collaborativeStateMachine {
stateMachines {
["producer"] {
states {
["init"] = new Initial {
entry {
new Emit { event = new Internal { topic = "send" } }
}
on { ["send"] = new Transition { to = "send" } }
}
["send"] = new State {
after {
["send"] = new Timeout {
delay = "std:randomAround(10,2)"
triggers = new Emit { event = new Internal { topic = "send" } }
}
}
on {
["send"] = new Transition {
to = "init"
yields { new Emit { event { topic = "increment" } } }
}
}
}
}
}
["counter"] {
transient { ["count"] = "0" }
states {
["count"] = new Initial {
on {
["increment"] = new Transition {
yields {
new Eval { expression = "++count" }
new Ctr { counter = "counter.count" }
}
}
}
}
}
}
}
}
instances {
["counter"] { stateMachineName = "counter" }
["producer"] { stateMachineName = "producer" }
}