But sometimes you want to put ‘B’ ahead of ‘A’. Now you can pre-declare any participants.
Some tips:
- Participant declaration must be the first lines in the code.
- The declaration also works for async messages —
B A A->B: any message
. - You can edit the code in codesandbox.io directly. Try https://codesandbox.io/s/2wy0pp9k2y?module=%2Fsrc%2Fsamples%2FSample.seq