Book a Demo

Author Topic: Problem with shape scripts and profiles  (Read 5050 times)

Ralf

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Problem with shape scripts and profiles
« on: May 09, 2010, 07:11:28 am »
I have a funny problem...

I try to generate a BPMN 2.0 profile. So far, everything is fine. If I import the profile, everything works.
I then tried to generate a technology file (for the diagram type and toolbox). This works partly.

If I import the technology, it works.
If I put the technology in the MDGTechnologies folder, it gets automatically loaded, but some shape scripts (Activity, Lane) do not work and I can't figure out why.
The Lane is nearly the same as the Pool shape (shape script is a little bit different)...

Does anyone have a clue what could be the problem?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Problem with shape scripts and profiles
« Reply #1 on: May 09, 2010, 10:11:29 am »
Hi Ralf,

I've been having a LOT of trouble with profiles and shape scripts recently.

What I recommend is to first turn off ALL other MDG technologies (including BasicUML) to see if your profile now behaves itself.  If so, then progressively turn on the other technologies until your shape script stops working.

If the shapescript doesn't work with all the other MDGs disabled, then you'll have to try to debug things yourself (often NOT an easy task).  However, you'll be better placed to debug with all the others disabled.

Needless to say, I'll be preparing another proposal to hopefully sort some of this confusion out.

If you're dealing with MDGs you might be interested in: Consistent Diagram Item rendering proposal
Please support the proposal.

HTH,
Paolo
« Last Edit: May 10, 2010, 09:52:46 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Ralf

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: Problem with shape scripts and profiles
« Reply #2 on: May 10, 2010, 06:02:30 am »
Hi Paolo,

you where right: after renaming the MDGTechnologies folder and creating a new one, all my problems where gone!

And yes, I will support your proposal since these are exactly those things which ennoy me!

Ralf

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Problem with shape scripts and profiles
« Reply #3 on: May 10, 2010, 01:30:05 pm »
Glad it helped...

I. too, have had to resort to scrapping the Technology folder and starting again...

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

Ralf

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: Problem with shape scripts and profiles
« Reply #4 on: May 18, 2010, 04:19:42 am »
OK. here is the ultimate solution:

it seems that there can be only one stereotype with a given name for a given UML element at a time.

For instance, if you already have a stereotype "Activity" for the UML element "Activity" and you create another one through a profile, only one will exist and hence it can look like your shape script does not work.

The workaround is to use a prefix for your stereotype names (like "MyActivity") and rename the stereotype by set the _metatype attribute to the right name.

So best practice should be to always use such a unique prefix when you build your own profile...

This seems to work quite well.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Problem with shape scripts and profiles
« Reply #5 on: May 18, 2010, 09:25:47 am »
There's a bug report (wit the last three months) where I document that EA picks the WRONG stereotype in the case of multiple stereotypes with the same name.

You are allowed to have multiple stereotypes with the same name - because EA DOES store the details of which stereotype was applied.  It just picks the wrong one...

Search for the bug report and submit a vote for its fixing!

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