Book a Demo

Author Topic: Mechanism for attaching BPMN objects to Flows  (Read 12421 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Mechanism for attaching BPMN objects to Flows
« on: November 06, 2010, 02:17:36 pm »
BPMN allows you to attach various vertices (generally Artifacts) to arcs (typically to flows) to indicate annotations or data objects that are flowing along the flow.

Unfortunately, EA ONLY allows you to attach a Note or a Constraint to an arc.  This poses a problem when creating BPMN diagrams.  I decided to create a Note or Constraint and attach it to the required arcs and then set the stereotype to (for example DataObject).  Lo and Behold!  I get the Data Object shape – but (and with EA there’s almost always a but) the “NoteLink” lines disappear from the diagram.  

Interestingly, the connectivity metadata is still there (as can be seen by removing the stereotype).  The metadata is stored in the PDATA4 column of the vertex record.

It’s not clear why the addition of the BPMN stereotype removes the NoteLink lines (since the application of other stereotypes - including those with shape scripts – doesn’t), but further research suggests that the reason why the lines disappear might be that the shapescript does not contain a “drawnativeshape()” statement.

However, in order to allow the drawing of such shapes correctly, I have created shapescripts which attach to Note Elements and draw the correct shapes.  The stereotypes are case varied (that is, dataObject instead of DataObject) since otherwise the BPMN shapescript will take precedence - and you'll lose the "Notelinks".

It is hoped that the BPMN stereotype shape scripts can be rectified at a later date, but this mechanism will provide a satisfactory interim solution.

Thoughts?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Mechanism for attaching BPMN objects to Flows
« Reply #1 on: November 09, 2010, 12:14:35 am »
Bravo Paolo!

I used another approach when I hit this problem: I gave up.

IMHO your solution seems better.

David
No, you can't have it!

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Mechanism for attaching BPMN objects to Flows
« Reply #2 on: November 09, 2010, 03:41:53 am »
Hi Paulo

I have also used this technique as a work around, in fact I believe I published my shapescript in these very forums.

I have also tried tried profiling (with a shapescript) and association class, again with some success, but this was more complex than the first approach

Cheers

Phil
Models are great!
Correct models are even greater!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Mechanism for attaching BPMN objects to Flows
« Reply #3 on: November 09, 2010, 10:56:16 am »
Hi Phil,

Yes, I came across your shapescript AFTER I published - when I went looking for examples on how to use setorigin().

The ability to attach arcs to other arcs is a generalized problem in modelling and so it is to be hoped that Sparx can provide a more generic solution sooner rather than later.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!