|Validation decorators missing [message #1572707]
||Mon, 19 January 2015 09:31
| Cédric Casenove
Registered: December 2013
Using version 1.1.1 of the modeler, I noticed that I do not have validation decorators in the diagram anymore.
I looked at the getDecorators() method in the Bpmn2ToolBehaviorProvider class and I observed that ShapeDecoratorUtil.isValidationDecorator(pe) is always false and I never enter the block which should add the decorators. I found that the only place where you set the GraphitiConstants.VALIDATION_DECORATOR property is in the ShapeDecoratorUtil.createValidationDecorator(), which is only called in AbstractBpmn2AddFeature.decorateShape(). For activity elements, this method is overriden in AbstractAddTaskFeature class and so not called. For event elements, the decorator pictogram element is created, but with the active property set to false, and the Graphiti framework seems to not call the getDecorators() method for non-active pictogram elements.
I managed to add a validation decorator on a custom task by overriding the decorateShape() in my add feature and calling ShapeDecoratorUtil.createValidationDecorator() then setting the active property on the returned pictogram element (the error marker is not very well positioned in the left corner, but that's another story).
I hope my explanations are not too confused. Let me know if I misinterpreted the code. If you think a bug needs to be filled in bugzilla, I can do it as well.
Thank you very much.
Powered by FUDForum
. Page generated in 0.01731 seconds