piątek, 30 września 2011

Fork/Join under a condition

After an Activity 1 there is an Activity 2 and - under a certain condition - simultaneously Activity 3. After Act.2 and Act.3 are finished or after only Act.2 is finished (if the condition is not fulfilled) there is an Act.4. The problem is how to model this on an Activity diagram? 

Below there are two Act. diagrams showing this situation:


The above diagram comprises a problem. What if the condition is not fulfilled? How long should we wait after Act.2 to start  Act.4?


















This digram shows the solution: we should use decision diamond representing the condition. If the condition is not fulfilled the flow goes to the Join and waits for the end of Act.2 then flow goes to Act.4