Sparx Systems Forum
Enterprise Architect => Uml Process => Topic started by: Peter Eisses on July 23, 2013, 10:28:43 pm
-
I am preparing BPMN 2.0 process diagrams using Business processes, Activities, Gateways, and the like. Does anyone know how I can give each diagram element type a specific color. For instance I want to color all gateways red and all activities yellow.
I have somehow lost my way in BPMN stereotypes and shape scripts. >:(
The way of working with BPMN diagrams is different from working with UML core types. Who can help me out.
-
Somehow this should be possible using Template Packages. You need to consult the help (or wait for another wise guy) since I have never really used it.
q.
-
qwerty is perfectly correct!
Template packages are the way to go, briefly
1) Create a view or package
2) Add a BPMN 2.0 diagram (Business Process for example)
3) Add an Activity and a Gateway element
4) Set the colour to those of your choice
5) Use the Settings | Project Template Package... menu option
6) Navigate to the package created in 1) above
Now, when you create a [highlight]new[/highlight] BPMN 2.0 Business Process Diagram all [highlight]new[/highlight] Activities and [highlight]new [/highlight]Gateways will show the colours you set in 4) above
Repeat the above for any other BPMN 2.0 diagram types /elements
[highlight]NOTE
This process only works for new diagrams, the colours are not applied retrospectively to existing diagrams and elements.[/highlight]
Hope this helps
Cheers
Phil
-
The solution philchudley pointed out for setting project default color works fine as you described. There is however one effect whcih we found out this morning. All the tag values for newly created elements in the Project Template Package have been doubled in the Property dialogue box.
For instance Activity has a tag value called Activity Type under the Properties | BPMN2.0 | Activity which can be set to either Task or Sub-Process. After applying the Project Template Package as described there are now two entries both called Activity Type.
Any idea on how get rid of the second entry?
Thanks in advance -- Peter
-
Just a shot in the dark without having tried it: remove the tags in the template package.
q.
-
Now that is interesting! Looks very much like a bug to me
I have checked my tests and you are correct, the BPMN 2.0 tagged values for Activity element are indeed duplicated! However the Gateway element is just fine!
Have not checked for other elements (eg events)
Also, changing the second tagged value in the list appears to have no effect, whereas changing the first achieves the desired effect)
How to remove the duplicated tags? Sorry I cannot thing of an easy way, Methods that I have in mind are
1) Export / Import via csv
2) Scripting
3) Manually removing the tags from a single Activity, then using this Activity to "clone" others
[highlight]NEWSFLASH
Just saw qwerty's post and yes his suggestion does work, open your template package diagram, remove the tags from the Activity element
Then when you add a new activity it should only have a single set of tagged values. You will have to fix manually any activities which already have duplicate tags[/highlight]
Cheers Phil
-
You should also report that as bug to Sparx. If it's a feature instead, it needs to be described in the documentation (which I suppose it's not).
q.
-
Already reported this as a bug. the fix Sparx suggested (for now) was as mentioned to remove the tagged values. Also note that although the color is applied when you add an element from the palette to a diagram it is not applied if you drag an element from the project browser to the diagram ! Apparently this is as designed ! The solution suggested here is to create your own profile that applies the colours...