Search code examples
umlactivity-diagram

Activity diagram UML: An alternative flow within an alternative flow?


Taken that there is another basic flow and carwash is already an alternative flow:

enter image description here

A1 : Check cars to be washed

A1.1 The system searches the car in the garage system whether it needs to be washed or not

A1.2 The system found the cars and gives the cars status = 'to wash'

(When step A1.1 does not find the car, it should check the parking system before the status = 'to investigate') I describe this part in the Special requirements part of my Use Case template.

A2 (or A1.1?): Check parkingspot system

A2.1 The system checks the cars in the parking system with status 'to wash'

So in this case A1 and A2 needs to be checked before it gets = 'to investigate'

The struggle:

I am struggling with the fact that my alternative flow 2 is on paper the process after step A1.1 of alternative flow 1 and it feels like it is an alternative flow of alternative flow 1 because it checks another system when it couldn't find data during step A1.1. Is it a problem to model it like this while there is also a step A1.2?
How can I model a process like that in an activity diagram? Or is it ok to model it as A1 and A2 (even when A2 is a process which take place after step A1.1 and there is also a step A1.2)?


Solution

  • from your last remark :

    The preconditions: we know we had a car with number GJ35X for example and we want to find it, only we dont know whether it is in the garage system or in the parking spot system. It needs to go to investigate status when we can not find it in both systems

    the activity manages just one car and can be :

    enter image description here