Jump to: navigation, search

Difference between revisions of "STP/BPMN Component/Reusing the modeler"

m (Other needs)
Line 11: Line 11:
 
Here are various techniques to use that ability.
 
Here are various techniques to use that ability.
 
=== Display the value of the annotation ===
 
=== 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.
+
By default the EAnnotations 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?
+
EAnnotations are tied to their EModelElement through the source property which is a String.
TODO: Antoine Toulme developed this part and might want to comment further.
+
EAnnotations contain a HashMap of Strings to Strings.
 +
 
 +
The BPMN properties view display a table with two columns:
 +
The first column is the source of the EAnnotation concatenated to the key of the Details HashMap.
 +
 
 +
The second column is the value of the Details HashMap.
 +
 
  
 
=== Displaying the annotation on the diagram ===
 
=== 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.
+
Once the model has annotations it is 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.
 
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
 
Please refer to the documentation of the extension point: org.eclipse.gmf.runtime.diagram.ui.decoratorProviders

Revision as of 23:27, 1 December 2006

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 EAnnotations added to the bpmn objects are displayed in the properties view inside the 'BPMN' tabulation.

EAnnotations are tied to their EModelElement through the source property which is a String. EAnnotations contain a HashMap of Strings to Strings.

The BPMN properties view display a table with two columns: The first column is the source of the EAnnotation concatenated to the key of the Details HashMap.

The second column is the value of the Details HashMap.


Displaying the annotation on the diagram

Once the model has annotations it is 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.

Other needs

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.

We have made many packages public for now.

Also GMF validation services are very useful when adding extra rules are to analyze the code.

As we identify implementation of those services that are specialized to the stp.bpmn model they will be exposed as extension points.