i am trying to develop an UML state machine diagram for the following problem:
a vending machine has 3 buttons: R for 'return money, A & B for drink selections. when the vending machine receives amount x of money the user can choose between the drinks. pressing R returns the money without serving a drink.
if a button is pressed before any money is inserted - the machine produces an alarm signal. in case A or B is pressed and >= x money is inserted - the drink will be served.
when serving is done, an alarm sound notifies the user. the change money gets returned. after taking out the drink, the machine goes into the end-state.
my issue is that i am working with parallel 'processes' and i believe that there must be a simple configuration for this scenario. can somebody provide/guide me with the right ideas to solve this in an elegant way?
edit: after using the suggestion of @Chris Reynolds i came up with this: