Book a Demo

Author Topic: Multiple lifecyles on a timeline  (Read 2119 times)

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Multiple lifecyles on a timeline
« on: March 01, 2005, 07:15:38 pm »
OK I think I'm getting the hang of these dang "alt" and "ref" fragment thingies.  

But, ... 2 questions.

I want to  show the two outcomes of two alt flows both of which have terminating effects on the lifecycle of one of the objects.

In the first case, the object sends a (asynch) message to an object not of concern to this model and then exits.  So, I can either
1) treat is a "lost" message and set it between the object and an Endpoint - fine. ..or
2) add a ref fragment and a message gate and point it there - equally fine.
Now here's the problem.  Once that message has been sent, this object can exit.  IOW the lifecycle (not just the activation level or of the source object ends.  I dont see how to make this happen?  I have even tried using a self message but I still dont get the little X to appear.  The only way to get it is to create an incoming message?

Now the second case.  In this alt fragment something happens that just makes the object exit - let's say user clicks "Cancel" button - without doing anything else.  Now, this one works - sort of.  I add the message from the user to the object and set the lifecycle to delete.  OK now I get the little X under the lifeline end.  But, this now overrides the X in the above fragment. ???

Is dis a bug?

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

thomaskilian

  • Guest
Re: Multiple lifecyles on a timeline
« Reply #1 on: March 02, 2005, 02:23:39 am »
I *guess* this is by design. On the first glance these fragments look nice but OTOH you soon fall into traps when actually using the alternates. Objects that die in the first alternative should restart their lifeline in the second. Any way you do it you'll get in trouble. So my suggestion is to define multiple diagrams instead, if you encounter problems as you described.