Page 1 of 1

How to get Source and Target of message in a Sequence Diagra

PostPosted: Mon Aug 30, 2021 12:32 pm
by nrichlen@hotmail.com
hello all.

I am trying to do what the subject line suggests. I am going through the messages in my sequence diagrams and I want to get the Source and Target of the message. If you know of a better solution I am "all ears" because it feels like the wrong path.

Right now, I iterate over the messages in a sequence diagram and I get the the OccuranceSpecivication via a "getSendEvent" call. From there I get the appropriate lifeline via the "getCovered" call. I then called "getRepresents" got the property. I used the "PropertyResourceProvider" getString call to get the name of the object so I could look up the element but my call fails. Not sure why. The JavaDoc only says I need 2 args but three is expected when I try to run the script.

2 Questions.
1. Am I running off the road? Is there a better way of doing this?
2. Why is my PropertyResourceProvider failing?

Re: How to get Source and Target of message in a Sequence Diagra

PostPosted: Tue Aug 31, 2021 8:20 am
by nrichlen@hotmail.com
In case you have the same problem you can get the "type" from the Property object. From here I will look up the object using the Finder. If someone knows of a better way let me know. Seems like I had to work hard to get the endpoints of a message so I don't think my way was the best/right way.

I still have no idea why the PropertyResourceProvider call won't work. I suspect there is a Jython intricacy that I'm missing but I don't know.