Book a Demo

Author Topic: Read "Duration Constraint between Messages" from Sequence Diagram in C# script  (Read 6135 times)

ankur

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Hello,

I am designing a Scheduling process using UML Sequence Diagram. I am trying to read "Duration Constraint between Messages" property from Sequence Diagram in C# Object Model. 

I can see that this property can be read out using Transitions Collection (refer Page number 175 of Enterprise Architect Object Model document) in State Diagrams. But I cannot find any possibility to read the property from Sequence Diagram.

I saw in some post that you can add the Constraint Note in the Sequence diagram. But as also suggested by some user, due to large number of elements, the Constraint notes make the diagram very congested and cluttered.

Is there any possibility to read this data using standard Enterprise Architect API variables in C# or any other scripting language ?

Regards,
Ankur

Edit: "Duration Constraint between Messages" is available when you right-click a Sequence between two Lifelines in Sequence Diagram and go to Timing Details...
« Last Edit: March 13, 2019, 12:13:39 am by ankur »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
I'm not sure what you mean by "duration constraint between messages". Can you post an example?

(post the image on a public image hostign site such as imgur.com and post the link here)

Geert

ankur

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
The "Duration Constraint Between Messages" are marked in the Red rectangles:

https://pasteboard.co/I54ZxzB.png

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
In the connector styleEx property you find

SEQDC=<val>; where <val> Duration Constraint

and others. See p. 58 of my Inside book.

q.

ankur

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Hello,

Thanks for the responses. I went through the Inside EA book (Connector StyleEx Property section).

Since I am quite new to EA, I would like to know how can I use the Connector StyleEx Property to read the Duration Constraint. A pseudo code or a link directing me to some further explanation will be quite helpful.

Thanks in advance.

Regards,
Ankur

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Ankur,

The StyleEx is in a key1=Value1;key2=Value2 format.
Do some experimenting and you'll surely figure out what goes where.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
It should be sufficient to split the styleEx by ";" and examine the sub-strings. The one starting with "SEQDC" has the duration between the "=" and the ";".

q.

ankur

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Hello,

I could reach up to this point:

SELECT * FROM t_connector.StyleEx where SEQDC="Duration Constraint"

I know it is not close enough but I can guesstimate that <val> has to be a part of the query. Can someone please correct it ?

Thanks in advance.

Regards,
Ankur

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Hi Ankur,

I though you were using the object model, and now you want to query the database?

Anyhow, the "SQL" you wrote is not even close. I think you better first get a grasp of the basics of SQL.

Geert

ankur

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Hi Geert,

That was just a logic that I was trying to build from the information you provided. It was more of a pseudocode.

I looked it up in the object model and found out that the Duration Constraint Between Messages is provided in the form of DCBM=<value>

The link to the screenshot is here:

https://pasteboard.co/I55KT7C.png

Thanks.

Regards,
Ankur