STP/BPMN Component/Reusing the modeler
Annotating the stp.bpmn domain model
This paragraph explains how to add to the bpmn diagram custom data. It also describes how to display and interact with that custom data.
The reader needs to be familiar with EMF and in some cases to GMF/GEF.
Every element of the domain model of the stp.bpmn modeler is an EMF EModelElement. This means that it can be attached arbitrary annotations.
Here are various techniques to use that ability.
Display the value of the annotation
By default the EAnnotation added to the bpmn objects are displayed in the properties view inside the 'BPMN' tabulation. It is possible to edit those annotation's value at least when they are a String. It is also possible with standard extension points related to properties to filter things? TODO: Antoine Toulme developed this part and might want to comment further.
Displaying the annotation on the diagram
Once the model has annotations it possible to display in the diagram that the model element associated to a particular shape or connection has been annotated. In order to do this, you will need to implement a GMF Decorator Provider. Please refer to the documentation of the extension point: org.eclipse.gmf.runtime.diagram.ui.decoratorProviders
We are considering exposing a specialized extension point for associating a figure to an annotation. TODO: Antoine Toulme developed this part and might want to comment further.
Annotate the stp.bpmn: Drag and Drop
It is possible to drag and drop things to attach annotations to the stp.bpmn domain model. Use the extension point: org.eclipse.stp.bpmn.diagram.EAnnotationDragAndDrop The object dragged must be "IAdaptable" to an EAnnotation. The implementation of the extension point will define if the drop can execute and will show feedback in a balloon figure. This extension point is only giving access to the domain model. TODO: Antoine Toulme developed this part and might want to comment further.
The hardcore way to customize the editor consist of making your own BPMN Editor with its own EditPart factory. All you need to do is extend the stp.bpmn Editor and EditPartFactory.
There are also the live and batch GMF validation services that accept plugged things. As we identify implementation of those services that are specialized to the stp.bpmn model they will be exposed as extension points.