Red Hat Bugzilla – Bug 1019875
Title of element does not reflect an element type
Last modified: 2014-08-06 16:08:53 EDT
Description of problem:
If you change type of task from None task to User task then the title is is still same.
User is able to recognize Start Event and Message Start Event but not Message Start Event and Message End Event.
See attached screenshots.
Use an unique identifier for each type of element.
Created attachment 812966 [details]
Title for User Task - screenshot
Created attachment 812968 [details]
Title for None Task - screenshot
Created attachment 812969 [details]
Title for Start Event- screenshot
Created attachment 812970 [details]
Title for Error Start Event- screenshot
Created attachment 812983 [details]
Title for Error End Event- screenshot
Created attachment 812984 [details]
Title for End Event- screenshot
There was no easy way to fix this issue due to the addition of type-specific tasks in the stencil set. The titles are not dynamically reset on node creation so they do not change when the type changes (morphing).
I have removed titles from svg nodes on the canvas (nodes + edges/sequence flows). I think this is the best thing to do to not confuse users at this time.
As far as iterating through the nodes on canvas for your tests. Using the title is probably a bad idea anyways. Designer exposes you with a JS api you can use to easily iterate over these..for example lets say you have designer loaded on the browser (designer-standalone lets say), you can do:
window.frames.ORYX.EDITOR._canvas.getChildren() to get a list of all children of the canvas (all nodes). Note that you might have to replace the "2" with another number depending if you are testing designer-standalone or kie-wb for example. Now you can iterate if you want with JS:
the alert will give you the stencil set title of the node which is the best way of determining its type, for example it will give you:
- http://b3mn.org/stencilset/bpmn2.0#Task for tasks
- http://b3mn.org/stencilset/bpmn2.0#ParallelGateway for gateways etc
if you want a specific task type you can do for example:
which will give you for user task "User" as result..there are lots more things you can do with the Designer JS api but I hope this helps for now.
Verified on ER5.