I am writing my first state diagram for an approvals matrix and I am stuck. An Order in our system will go through a number of states and transitions for approval:
States
My problem is that the awaiting approval states will only transition to Live state when N number of approve() events, for each order, are received (an approval from one user will trigger a notification for approval from another user).
Should I add a decision point after the Awaiting Approval state that does a self transition back to Awaiting Approval OR progresses to Live state based on a count of approvals (is that allowed? Or am I missing something?)
Any help would be appreciated. Most state diagrams I look at are based on a set number of approvals, not a variable list.
You will add a guard:

The approval trigger has a behavior inc approval count. Now the guard [approval count > N] will pass only if the counter is great enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With