Sending conditional messages in a uml communication diagram

555 views Asked by At

I want to represent the following pseudo-code in a communication diagram:

A::someoperation(collection)
Begin
  Foreach elem in collection:
    if condition_1 then: 
        create B;
    else if condition_2 then:
        create C;
    else if condition_3 then:
        create D;
  End Foreach;
End someoperation

Is there a standard way to do this? I don't think what I did in the following image is correct:

communication diagram

0

There are 0 answers