Book a Demo

Author Topic: FQ (BPMN) Stereotype names in Project Browser?  (Read 8650 times)

Nick Webb

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
FQ (BPMN) Stereotype names in Project Browser?
« on: October 12, 2016, 06:53:31 am »
I have written some VBA to change diagrams imported from Visio using the Visio Importer add-in to BPMN2.0.
I have used FQ Names to change the imported elements, e.g. anElement.StereotypeEx = "BPMN2.0::Activity".
This appeared to work fine in an empty project used to test the VBA but the behaviour seems different when running it against our project model!
i.e. in the empty project the element stereotype appears in the Project Browser as <<Activity>> but in the project model appears as <<BPMN2.0::Activity>>  and I'm wondering if I've done something wrong!
Checking the database, in the empty project t_object.stereotype = "Activity", but in our project model appears as "BPMN2.0::Activity".
Any idea why the FQ stereotype name appears in one case but not the other?!
I should add that this behaviour is happening only for Activity elements - Gateways, StartEvents, EndEvents seem fine/consistent.
Seems weird - any help much appreciated. 

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #1 on: October 12, 2016, 07:14:10 am »
It might simply be the case that the according MDG is not turned on.

q.

Nick Webb

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #2 on: October 12, 2016, 07:17:15 am »
Thanks but I've checked that BPMN2.0 is checked in Extensions>MDG Technologies and went as far as unchecking BPMN1.0 and 1.1 - any idea whether setting StereotypeEx should achieve the expected result?

Cheers, Nick

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #3 on: October 12, 2016, 07:55:00 am »
StereotypeEx is just interesting if you deal with multiple stereotypes, so you get (put) a comma separated list. For setting a single FQ stereotype there is(/should be) no difference.

You should check with a single element. Look into t_xref where you should spot the FQ part of the stereotype.

q.
« Last Edit: October 12, 2016, 07:56:50 am by qwerty »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #4 on: October 12, 2016, 10:35:42 am »
I've checked that BPMN2.0 is checked in Extensions>MDG Technologies and went as far as unchecking BPMN1.0 and 1.1

But was BPMN2.0 enabled at the time that you ran your script? If you try to apply the stereotype "BPMN2.0::Activity" through a script at a time when EA doesn't know what "BPMN2.0" is, I'm not entirely sure what will happen but I suspect EA will create a dummy stereotype named "BPMN2.0::Activity" in the t_stereotypes table (Configure|UML Types|Stereotypes). Try deleting that stereotype and re-running your script with BPMN2.0 enabled.
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #5 on: October 12, 2016, 10:52:57 am »
I've checked that BPMN2.0 is checked in Extensions>MDG Technologies and went as far as unchecking BPMN1.0 and 1.1

But was BPMN2.0 enabled at the time that you ran your script? If you try to apply the stereotype "BPMN2.0::Activity" through a script at a time when EA doesn't know what "BPMN2.0" is, I'm not entirely sure what will happen but I suspect EA will create a dummy stereotype named "BPMN2.0::Activity" in the t_stereotypes table (Configure|UML Types|Stereotypes). Try deleting that stereotype and re-running your script with BPMN2.0 enabled.
We've noticed these types of "qualified" stereotypes appearing in the general stereotypes list and it does look as though they are dummies created by EA when under some types of automation.

In our case they are:  <Our MDG>::<our stereotype>.  When we spot them (we've now got a query to find them, we delete them, but they come back again, because they may be embedded in t_xref.

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

Nick Webb

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #6 on: October 12, 2016, 08:55:35 pm »
Thanks v much for the replies - I can confirm that BPMN2.0 was enabled at the time the script was run.
The only conclusion I can come to is that some modelling had previously been done in BPMN1.0 (I found a stray element) so I'm guessing that this stereotype is embedded somewhere in the database which may have caused EA to need to differentiate it.  If I can come up with anything more sensible then I'll report back...
I haven't done any automation for yonks either  :)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #7 on: October 12, 2016, 10:13:04 pm »
I most of my scripts I've used the non-qualified version of the stereotype (so simply "Activity").
If the correct BPMN MDG is active (and only that one) then EA seems to be able figure out that I mean BPMN2.0::Activity

Geert


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #8 on: October 12, 2016, 11:09:40 pm »
That's strange, Geert. I just tried that.
Code: [Select]
p->Elements->AddNew("A", "Activity") creates a simply activity while
Code: [Select]
p->Elements->AddNew("A", "BPMN2.0::Activity")creates an elements showing an <<Activity>> stereotype in the browser. And when dragging that onto a diagram a menu pops up which asks for BusinessRule...Abstract (so being a full BPMN2.0 thigy).

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #9 on: October 12, 2016, 11:16:16 pm »
That's when making a new element, not when applying a stereotype to an existing element.
Adding a simple Activity and then setting the StereotypeEx to "Activity" yields the same result.

Of course when adding new elements using the qualified stereotype as type parameter is the preferred way.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: FQ (BPMN) Stereotype names in Project Browser?
« Reply #10 on: October 13, 2016, 12:47:38 am »
You are right. That worked.

q.