Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Filip Hendrickx

Pages: [1]
1
General Board / Show Activity notes and attributes
« on: June 04, 2013, 06:22:42 pm »
Hi all.

For most UML elements, you can show the notes and attributes via Feature and Compartment visibility. However, this doesn't work for UML Activities, nor for derived elements like BPMN Activities or Archimate DataObjects.

A workaround I found is to link a note element to the element's notes. You can also link the note element to the Activity's attributes, but you then need to create a separate note for each attribute, which is not practical.

Is there a way to show an Activity's notes and attributes, or another workaround?

Best regards,

Filip.


2
Hi all.

I have my own toolbox, which is a subset of ArchiMate2 and BPMN2.0, created via toolboxpages. I also have added my own diagram type that automatically loads this toolbox.

However, when for example an ArchiMate business process from my own toolbox is made composite, the diagram that is automatically created, is an ArchiMate diagram. I'd like this to be my own diagram type.

I'm able to get this behavior with standard UML elements, as explained in the link below, but I can't get it working with ArchiMate elements.

http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/defining_child_diagram_types.html

Any experience with this? Or perhaps not possible (it's not the first time ArchiMate and BPMN are giving me a hard time :-))?

  • I'm using EA 10
  • The toolboxpage refers to Archimate2::ArchiMate_BusinessProcess
  • The profile metaclass I use is of type Activity
  • I'm not sure what name to use for the stereotype extending this metaclass.

Best regards,

Filip.

3
Hi there.

If you don't need to add things (e.g. tagged values) to the SysML connector in your toolbox, it should suffice to only add it to the toolbox, and not to the profile. That way, you simply reuse the SysML connector.

At least, that's how I got it working for elements (haven't tried connectors yet).

Filip.

4
Hi Dermot.

That seems to work, nice trick!

(Still a workaround, though, so if anyone knows another way around this, I'm curious.)

Thanks very much,

Filip.

5
Hi all.

I try to create ArchiMate 2 elements through a vbscript, like this:

Code: [Select]
dim elements as EA.Collection
set elements = currentPackage.Elements
elements.AddNew("elementName", "ArchiMate2::SystemSoftware")

This example seems to work fine. However when using "ArchiMate2::Device" it creates an ArchiMate 1 Device, and when using "ArchiMate2::ApplicationComponent" I get a TOGAF ApplicationComponent.

I would expect that I should use the exact type names from the technology definition ("ArchiMate2::ArchiMate_SystemSoftware" etc. like in the Scripting EA book) but this gives an error message (wrong type).

While there are workarounds, I was wondering if anyone could point out the correct way of creating these ArchiMate2 elements.

Best regards,

Filip.

6
Thanks for your replies.

I had already tried extending BPMN2.0 stereotypes, with no luck. After a few more experiments with this approach, it seams

  • to keep the original BPMN tagged values, but in a flat list, sections are removed;
  • to only keep them under the BPMN2.0 title when working via MDG, not direct profile import via resources (which is fine);
  • that I can indeed add my own tagged values;
  • that specific behavior, like automatically making a business process composite, or adding an icon that depends on the tasktype of an activity (manual, user, ...), is gone. I could probably add this myself via shape scripts, but that kind of defeats the purpose of reusing BPMN.
  • that a profile created like this doesn't work well together with a toolbox defined through toolbox pages: when adding a BPMN element to a toolboxpage, I can't add tagged values to it via a profile (which is why I didn't get it working before: I seem to be unable to link the toolbox items with their profile definition).
Are these observations correct, or am I still missing something?

Best regards,

Filip.

7
Hi all.

I'm in the process of creating an MDG technology, containing a subset of the BPMN 2.0 technology and some UML elements. I do this by creating a toolboxpage metaclass, extended by a stereotype that contains only those elements that I want. These elements are defined as attributes on the stereotype.

See http://users.telenet.be/filip.hendrickx/SparxEA/Subset2.eap for an example eap file.

In a separate profile package, I then want to add my own tagged values. Adding attributes to e.g. a stereotype that extends a standard UML metaclass like class works fine. However, this doesn't work for BPMN elements.

It doesn't work for the UML::Artifact either. I can solve this by changing its name in the toolbox to MyTech::Artifact(UML::Artifact), so I guess the problem with the BPMN elements is also related to using correct names, but I can't figure it out.

As an aside: is it possible to define my own tagged values once and add them to multiple elements (stereotypes) through e.g. extension or another mechanism, without having to define them on each element?

Many thanks!

Filip.

8
OK, thanks for your replies!

Best regards,

Filip.

9
Hi Paulus. Works like a charm! :)

Thanks for the tip about the original MDG files. Very useful.

One related question I still have: is there a way of limiting what appears in for example the Event's submenus (None, Compensation, Conditional, ...)? That is, without hacking the original MDG file ;).

Do I have to recreate this menu, adding only the Event types that I need and setting the eventDefinition tagged value? Using a hidden submenu doesn't seem to get me there: I can't stop the Event's proper menu from appearing.

Best regards,

Filip.

10
Hi all.

I'm creating a toolbox that contains a subset of the Archimate and BPMN elements. I do this via a stereotype that extends a metaclass named "ToolboxPage" and contains attributes for each element that I need. The attribute name refers to the corresponding Archimate or BPMN element, like BPMN2.0::BusinessProcess.

However, when dropping certain elements from my toolbox on a diagram, nothing happens. Others work fine.

I suspect that I'm using incorrect names in my stereotype attributes, but don't know where to find the right names, so I can't be sure.

The problematic elements are:
  • The 3 BPMN events
  • The Archimate Communication Path and Network (may have to do with the fact that there are two of each, an element and a connector, and I don't know how to distinguish between them).

It could also be a typo, but I'm missing it :).

You can find an example repository here: http://users.telenet.be/filip.hendrickx/SparxEA/.

Any tips?

Best regards,

Filip.

11
Hello all.

A colleague of mine found the problem: I had overlooked that security must be enabled for workflow scripts to work.

I also noted that it only works for scripts created after security has been enabled.

Thanks for looking into it, Jon!

12
Hi Jon.

Thanks for your reply. I just took the standard workflow script and slightly modified the first (OnPreNewElement) and one but last (AllowVersionUpdate) function so that they disallow the change and give some feedback. Doesn't seem to work regardless of having the output (tried that to ensure these lines didn't have syntax errors).

Below you can find the modified parts of the script (full script is too large to include).

Regards,

Filip.

-----

Code: [Select]
public function OnPreNewElement( ElementType, ElementStereotype )

      MsgBox "OnPreNewElement speaking!"

      ' Obtain a reference to the current user
      dim currentUser
      set currentUser = WorkflowUser

      SetLastError "A validation error occured " & ElementType & " " & ElementStereoType, ERROR_OUTPUT
      
      OnPreNewElement = false
      
end function



public function AllowVersionUpdate( OldValue, NewValue )

      ' Obtain a reference to the current user and selected item
      dim currentUser, currentItem
      set currentUser = WorkflowUser
      set currentItem = WorkflowContext

    SetLastError "A validation error occured " & OldValue & " " & NewValue, ERROR_OUTPUT
      
      AllowVersionUpdate = false
      
end function

13
Hi there.

I'm new at making and using scripts in EA (9.2). So far, I managed to create and run project and diagram scripts. However, I can't seem to find how to make EA run a workflow script. If I understand correctly, these scripts should run automatically so that I e.g. can check whether the current user is allowed to perform the action he currently performs (like an object creation).

Creating a new workflow script in a workflow script group doesn't seem to do the trick.

Any help is greatly appreciated!

Filip.

Pages: [1]