Book a Demo

Author Topic: interaction: start a message from a self message  (Read 2551 times)

tvdberg

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
interaction: start a message from a self message
« on: February 20, 2005, 11:10:22 pm »
This acctually are two problems.

First, starting a message from a self-message in an interaction diagram is valid UML? For me it is, but I do not know for sure.

Second, if it is valid UML, I do not seem to get it working in EA (version 4.00xxxx, build 725).

What I want to do is:

- Add an instance of class A to the diagram
- Add an instance of class B to the diagram
- Add a self-message for the instance of class A (for example init())
- Start a message from within the self-message to the instance of class B (for example connect())

EA places the created message under the self-message. That would indicate it would be started after the self-message is finished. I want it to start and finish within the self-message.

for example:

void A::tick()
{
   if(this->connection == NULL)
   {
           this->init();
   }

   doSomething();
}

void A::init()
{
   B::connect();
}

static void B::connect()
{
   /* connect to something */
}

Takeshi K

  • EA User
  • **
  • Posts: 630
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: interaction: start a message from a self messa
« Reply #1 on: February 21, 2005, 12:24:35 am »
If I understand correctly what you mean,
please use 'Call' message instead of normal 'Message'
when you make 'connect()' from A to B.

Hope this helps,

--
t-kouno
--
t-kouno

tvdberg

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: interaction: start a message from a self messa
« Reply #2 on: February 21, 2005, 12:35:52 am »
Yes, that did the trick. Thanks