Book a Demo

Author Topic: BPMN Link Data Object to sequence flow  (Read 4526 times)

Raphael Parree

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
BPMN Link Data Object to sequence flow
« on: September 01, 2010, 07:41:45 pm »
Hi,

How in EA BPMN do you link a "Data Object" to a "sequence flow" (as for example shown in BPMN 1.1 specification Fig 9.40)

Thanks.,

Raphael

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: BPMN Link Data Object to sequence flow
« Reply #1 on: September 03, 2010, 06:12:56 pm »
Unfortunately you cannot link any element to a flow in the manner your desire.

Howver your can simulate it, by right-clicking the sequence flow and selecting "Attach Note or Constraint..." from the context menu.

This will attach a UML Note element (same shape as a BPMN Object, but with  a White Background).  You cannot change the colour of this background.

A more creative solution is as below:

This issue was asked previously and here is my original answer

-------------------------------------------------------------------------------

Unfortunately you cannot link an DataObject to a message (or sequence flow) as per the BPMN 1.1 notation.

The closest I have come to a work around is to Right-Click the flow, and Attach a Note or Constraint. I chose a note to represent the DataObject

Alternatively you can do this (surprisingly!)

1) Add two Activities to a BPMN 1.1 diagram
2) Switch the toolbox to Class diagram
3) Create an association class relationship between the two enties, thereby creating a class to represent the DataObject
4) Set the navigation on the association
5) Create a sequence flow between the Activities and drag it to be on top of the association created in 3)
6) To make the class look like a BPMN 1.1 DataObject, create a shapescript to draw the DataObject shape and assign it to a Class stereotype <<DataObject>>
7) Change the association class stereotype to <<DataObject>>

For your information the shapescript is:

shape main {
     startpath();
     moveto(0, 0);
     lineto(80, 0);
     lineto(100, 20);
     lineto(100, 100);
     lineto(0, 100);
     endpath();
     fillandstrokepath();
     moveto(80, 0);
     lineto(80, 20);
     lineto(100, 20);      
}
shape label {
     setorigin("SW", 0, 5);
     print("#NAME#");
}


Cheers

Phil
Models are great!
Correct models are even greater!

Arni Smit

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: BPMN Link Data Object to sequence flow
« Reply #2 on: September 07, 2010, 09:59:13 pm »
Thanks Phil, for the solution it works fine!
(Raphael thanks for already posting this question for me.)

What I did wonder was if it is possible to create a new kind of association class - that does everything as you described.

Something like an "association data object" which creates
 - a data object instead of a class
 - and displays/functions as the sequence flow

Best Regards,

Arni

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: BPMN Link Data Object to sequence flow
« Reply #3 on: September 08, 2010, 09:40:30 pm »
Hi Arni

Yes it should be possible, by creating a UML profile with the Association Class as the Metaclass (it is actually a connector, so that may complicate the shapescript a little), then choosing a suitable extension stereotype element (Profile toolbox)

In the stereotype element, create an attribute called _image and use the ... button next to Intial to open the shape script editor and enter the script as normal.

Save the profile packge as a UML profile, which can then be imported to any project. As a bonus you get your own toolbox for use with yout bepsoke element.

I haven't tried the above for this specific example, but have created many profiles.

Further details refer to the relevant section in the User Guide

Have fun!

Cheers

Phil
Models are great!
Correct models are even greater!

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: BPMN Link Data Object to sequence flow
« Reply #4 on: September 09, 2010, 01:41:01 am »
Hi Arni

I've been playing with this idea and I have got it to work! The trick is to attacha shapescript to the class as before (to the project you are working on), and then to create a new project to create a profile for the Association Class connector to change only the line to have a solid arrow

shape main {
    noshadow = true;
      layouttype = "topdown";
      setlinestyle("SOLID");
      moveto(0, 0);
      lineto(100, 0);
}

shape target {
      rotatable = true;
      setfillcolor(0, 0, 0);
      startpath();
      moveto(0, 0);
      lineto(16, 6);
      lineto(16, -6);
      endpath();
      fillandstrokepath();
}

Save the profile, and import it to your project (it will appear in the resources tab) and off you go!

Quite tricky to achieve.

Cheers

Phil
Models are great!
Correct models are even greater!

Arni Smit

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: BPMN Link Data Object to sequence flow
« Reply #5 on: September 23, 2010, 12:35:17 am »
Many thanks Phil,

I did miss your posts, received no notifcation or maybe it got lost in my spam box.

I will try to get it working here and let you know whether it worked.

Arni