Book a Demo

Author Topic: Sequence diagram, return message  (Read 5852 times)

tb

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Sequence diagram, return message
« on: July 31, 2008, 12:30:36 am »
Hello,
i got problem. I cannot solve how to create connector to be a return message in sequence diagram.

I can create something like this:


but i need something like this:


I have solved that i can do this in ea by setting isReturn in
properties of message:


Do You know how to do this by interface ?

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Sequence diagram, return message
« Reply #1 on: July 31, 2008, 03:16:50 am »
Can't try it out now cause I'm sitting at home on the sofa with an EEE PC, but if I got it right you'e adding a connector of type "sequence" to a package via automation interface, set its source and target to your respective lifelines, and then want to make it a return call.

The online manual lists no such property for EA.Connector, so maybe it's hidden in one of those indefinite collections. To find out I would try to iterate through the .Properties and .CustomProperties collections of the connector and print their names and values to the console (or debug window or whatever) to see if something looks like it.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Sequence diagram, return message
« Reply #2 on: July 31, 2008, 09:05:34 am »
The database field is t_connector->PDATA4 which changes from 0 to 1. In automation, that will be Connector.Miscdata(3). Is that field still read-only? If so, worth a feature request through the normal channels.
The Sparx Team
[email protected]

tb

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Sequence diagram, return message
« Reply #3 on: July 31, 2008, 04:13:40 pm »
Ok i have solved it out with suggestion of Frank Horn. I'am using Java API:

Code: [Select]
Connector conn = // get your connector here
Property prop = conn.GetProperties().Item("IsReturn");
prop.SetValue(new Boolean(true));

But this value is write only, becouse in Java API when you want to invoke Property.getValue() its throwing an exception, but only when the name of the item is "IsReturn"
Should I send a bug report ?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Sequence diagram, return message
« Reply #4 on: July 31, 2008, 08:38:02 pm »
Yes, I think you should.

Regardless of what this is supposed to be doing, throwing an exception does not seem to be the correct way to indicate a problem here.

That is, unless the property has never been set up. Even then, I'd expect you would not be able to access the property at all (i.e. the property name does not exist), or you should get a null value returned (i.e. the property has no value yet). You might want to do a little work - perhaps check an XMI export of the owning package - to see if the property is there at all when you first access it. If the property is defined - even without a value - then get send a bug report to Sparx.

David
No, you can't have it!