... | @@ -108,5 +108,5 @@ Possible results were: |
... | @@ -108,5 +108,5 @@ Possible results were: |
|
- Option 3: correct (pin) --> change to state WithdrawCash
|
|
- Option 3: correct (pin) --> change to state WithdrawCash
|
|
|
|
|
|
Based on this options, we define corresponding transitions, which may lead from our starting state to a different state.
|
|
Based on this options, we define corresponding transitions, which may lead from our starting state to a different state.
|
|
If we take option 1, we need to define a when-Event, which is triggered when the pin is incorrect and errorCounter < maxTries. The action increased the error counter and the user is able to try it again. Otherwise, if the pin is correct, we change the state to WithdrawCash.
|
|
If we take option 1, we need to define a change-Event, which is triggered when the pin is incorrect and errorCounter < maxTries. The action increased the error counter and the user is able to try it again. Otherwise, if the pin is correct, we change the state to WithdrawCash.
|
|
Within this state, we have three options - withdraw, deposit, and finish. The transitions are handled in the same way as in the state Authentication, except for the usage of the guard [amount <= balance], which condition needs to be true, otherwise the transition is not executed. In case of a failed authentication, we change towards the Rejected state and may present the user and information about the rejection. The same applies for finishing the WithdrawCash state. Both states lead directly into the final state without any events or guards. |
|
Within this state, we have three options - withdraw, deposit, and finish. The transitions are handled in the same way as in the state Authentication, except for the usage of the guard [amount <= balance], which condition needs to be true, otherwise the transition is not executed. In case of a failed authentication, we change towards the Rejected state and may present the user and information about the rejection. The same applies for finishing the WithdrawCash state. Both states lead directly into the final state without any events or guards. |
|
|
|
\ No newline at end of file |