Should alt/else in sequence diagram reset lifelines?

+4 votes
asked Oct 8, 2014 in Wanted features by anonymous

Hello,

Assume following sequence diagram:

A->B: Hi

activate B

alt

B->A: Hello

deactivate B

else

B->A: Hi

deactivate B

end

You'll notice B remains deactivated (without a lifeline) after the else statement. There is no way to restore the lifeline at that point in the diagram as the activate keyword applies to the last message even if it is in different alt/else box.

I think the else keyword should restore the lifelines to the same state they were at the point alt keyword was used (including multiple lifelines belonging to a single participant). Or perhaps there should be some modifier/option available to the alt/else keywords to achieve the same. Would you agree?

 

Best regards,

Daniel

commented Jan 25, 2018 by Anthony-Gaudino (5,720 points)
Currently you need to use a hack to do it:

A->B: Hi
activate B

alt
    B->A: Hello
    deactivate B
else
    A -[hidden]> B
    activate B

    B->A: Hi

    deactivate B
end


Or don't deactivate B in middle of alt:

A->B: Hi
activate B

alt
    B->A: Hello
else
    B->A: Hi

    deactivate B
end

1 Answer

+2 votes
answered Sep 15, 2017 by anonymous
I know this is 3 years old now, but I'm running into this problem as well. It seems like if you are, say, switching between threads in an alt/else, killing it in the alt shouldn't mean it's dead in the else.

Michael
...