Dashed-line Notation for Control Flow

471 views
Skip to first unread message

henagon

unread,
Mar 22, 2015, 3:55:54 PM3/22/15
to sparx-enterprise-archite...@googlegroups.com
Hi,

I'm a new user of EA (v11) and am utilising the SysML v1.3 toolbox.

I am creating an Activity Diagram, and have specified a Control Flow between two actions.

By default, EA shows the Control Flow as a solid line. This is identical to the way in which EA shows an Object Flow.

To add clarity to my diagram, I would like to show the Control Flow as a dashed-line.

This aligns with the SysML spec, and most example activity diagrams I have seen.

For example, see the dashed-line control flows on the left of this diagram (and compare with the solid-line object flows on the right):
http://i57.tinypic.com/2lapr4l.png

Can anyone suggest how to achieve this with EA?

Kind regards,
henagon

[original message]

KP

unread,
Mar 22, 2015, 6:37:05 PM3/22/15
to sparx-enterprise-archite...@googlegroups.com
Create a stereotype, give it this shape script, and apply the stereotype to all of your control flows


Code:
shape main
{
     noshadow=true;
     setlinestyle("DASH");
     moveto(0,0);
     lineto(100,0);
}

label middlebottomlabel
{
     print("");
}

[original message]

henagon

unread,
Mar 23, 2015, 5:46:37 AM3/23/15
to sparx-enterprise-archite...@googlegroups.com
Hi KP,

Many thanks for your extremely swift response.

I have implemented your suggestion, and learnt a lot about stereotypes and Shape Script in the process - thank-you!

This 'almost' does what I need - but not quite.

I have a Control Flow defined from a decision node, with a guard specified, which by default looks like:
http://s1.postimg.org/jsp2l85yj/image.png

I would like to display the guard on the diagram, and style the Control Flow with a dashed-line.

Implementing your suggestion - the Control Flow has a dashed-line but the guard is not displayed:
http://s12.postimg.org/m9mt7d3rt/1_5.png

I modified the Shape Script to remove the 'label middlebottomlabel { ... }' portion. The guard is now displayed, but unfortunately so is the stereotype name which adds significant clutter to the diagram:
http://s29.postimg.org/5fmaqaokj/image.png

Reading the description at this website https://leanpub.com/shapescript/read#leanpub-auto-hash-tags, I tried modifying the Shape Script with the following:

Code:
label middlebottomlabel { print("#guard#") }


Unfortunately this does not work - the guard is still not displayed.

Any ideas where I'm going wrong?

Kind regards,
henagon

[original message]

philchudley

unread,
Mar 23, 2015, 7:45:48 AM3/23/15
to sparx-enterprise-archite...@googlegroups.com
To suppress the control flow stereotype labels you could try

1) Open Diagram Properties
2) Select Connectors
3) Uncheck Show Stereotype Labels


Phil

[original message]

henagon

unread,
Mar 23, 2015, 8:56:12 AM3/23/15
to sparx-enterprise-archite...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages