...
There is no limit to the number of actions that can be placed inside a compound action. While there is no linguistic restriction on mixing actions that send JavaScript and those that send directives, no current endpoint understands both directives and JavaScript, so that is not typically done.
...
Sample
The other Another kind of compound action is the choose
compound sample
compound action. A choose
action sample
action takes a list of actions like every
, but instead of executing them all, it randomly picks one to execute. So, for example, the following would either send "This is one message!" or "This is another message!" randomly. The key reason for taking random action is to easily accommodate A/B behavior testing.
Code Block | ||||
---|---|---|---|---|
| ||||
if x > 5 then choosesample { notify("Hello World!", "This is one message!"); notify("Hello World!", "This is another message!"); } |
Choose
The choose
last kind of compound action can also be used to actually choose a specific action, like a case statement:
...