Jump to: navigation, search

Difference between revisions of "STP/BPMN Component/STP BPMN Presentation"

(Reusing the modeler)
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
* Quick access
 +
 +
[[STP BPMN Presentation]]
 +
 +
[[STP BPMN Presentation %28Part 1%29]]
 +
 +
[[STP BPMN Presentation %28Part 2%29]]
 +
 +
[[STP BPMN Presentation %28Part 3%29]]
 +
 +
[[Eclipse con 2007 STP BPMN Tutorial %28Setup%29]]
 +
 +
[[STP BPMN Presentation Hands on tutorial]]
 +
 +
[[From Modeling to Execution in the Enterprise -- using BPMN and BPEL]]
 +
 
== Introduction to the modeler ==
 
== Introduction to the modeler ==
  
Line 9: Line 25:
 
The team counts two committers, Alex Boisvert and Hugues Malphettes, and a contributor Antoine Toulme.
 
The team counts two committers, Alex Boisvert and Hugues Malphettes, and a contributor Antoine Toulme.
  
They all work for Intalio, Inc.
+
They all work for [http://intalio.com Intalio, Inc].
  
 
A first milestone of the project has been published in December.  
 
A first milestone of the project has been published in December.  
Line 22: Line 38:
  
 
Take a peek at the object model of the BPMN diagram editor:
 
Take a peek at the object model of the BPMN diagram editor:
 
+
 
[[Image:bpmnObjectModel.gif]]
 
[[Image:bpmnObjectModel.gif]]
  
 
The tool is responsible for the validation and enforcing the constraints defined by the specification.
 
The tool is responsible for the validation and enforcing the constraints defined by the specification.
 
== My first BPMN process ==
 
 
* Creating the diagram
 
 
Let's create our first Hello World process.
 
Let's create a simple project:
 
 
[[Image:newProjectForBpmn.png]]
 
 
And give it an appropriate name.
 
 
[[Image:SettingProjectName.png]]
 
 
You can create a new BPMN diagram by selecting the Examples category in the creation wizard.
 
 
[[Image:newBpmnDiagram.png]]
 
 
The wizard is very straight-forward, all you need is to indicate a folder and a file name.
 
 
[[Image:SettingNewBpmnDiagram.png]]
 
 
After clicking on Finish, you will see two new files appearing in the project.
 
 
[[Image:TwonewBpmnFiles.png]]
 
 
You can double-click on the bpmn_diagram file to open it as an editor.
 
The diagram initially contains one pool and a task.
 
 
[[Image:FirstViewOfTheBpmnDiagram.png]]
 
 
* How to create shapes in the BPMN diagram editor
 
 
You can use the palette to drop elements on the diagram. The palette can either be shown as a different view, or attached to the diagram.
 
 
[[Image:PaletteAsView.png]] [[Image:PaletteAttachedToTheDiagram.png]]
 
 
To drop a shape on the diagram, just click on it and then click on the diagram.
 
If you want to drop the same shape several times, you can double-click on it and it will appear as locked.
 
 
[[Image:LockedPaletteItem.png]]
 
 
To unlock it, just click on it again.
 
 
You can also use diagram assistants to create shapes. Leave your mouse where you want to drop the shape and you will see a bubble appear.
 
 
[[Image:DiagramAssistant.png]]
 
 
You can connect and create shapes using handles placed on the activities of the diagram.
 
 
Leave your mouse on the activity you want to connect. You will see the handles appear.
 
Then click on the handle and drag it to another activity.
 
 
Here are the messaging edges handles: [[Image:MessagingEdgeHandles.png]] and the sequence edge handles: [[Image:SequenceEdgeHandles.png]]
 
 
If you release the mouse button while not being over and activity, the menu below will appear to give you a chance to create the other extremity of the edge.
 
 
[[Image:MenuForCreatingMissingElement.png]]
 
 
After using repeatedly the operations described above, you can create a HelloWorld process that looks like this:
 
 
[[Image:BpmnHelloWorld.png]]
 
 
That's all folks !
 
 
== Get more ==
 
* Export the diagram as an image
 
Usually, when you want to export a GMF diagram as an image, you can follow this procedure:
 
1. Right-click on the diagram and select file, Export As file
 
 
2. A dialog pops up and you select the format of the image, its filename and location.
 
 
[[Image:ExportToImageDialog.png]]
 
 
We added an export wizard to do the same operation, since we have Eclipse users used to find everything in there.
 
1. Click on Export in the file menu.
 
 
2. Select the bpmn_diagram file you want to export.
 
 
3. Choose the format in the options, the image file name and location.
 
 
[[Image:ExportToImageWizard.png]]
 
 
* Copy/Paste in a text editor
 
Usually, people create a diagram under one application, then exports it to an image, and paste it to a text processor in the end.
 
 
With GMF, you can copy your selection of shapes, and paste it directly to your preferred text processor.
 
 
* Linking documents to the diagram.
 
You can drop a file contained in the project of the diagram on one of the shapes. Just drag and drop the file from the resource navigator to the shape.
 
You will see the icon representing a file on the shape.
 
[[Image:ShapeWithAttachedFile.png]]
 
 
You can open the file added to the shape in two ways.
 
You can right-click on the shape, click on Open With>[Associated file editor].
 
[[Image:OpenWithShape.png]]
 
 
Or you can directly press shift and simultaneously double-click on the shape.
 
 
* Change the type of the activity
 
You can change the type of an activity into other types of activities by using this context menu:
 
[[Image:ChangeActivityTypeBpmn.png]]
 
 
== Reusing the modeler ==
 
 
* Annotating the stp.bpmn Domain Model
 
 
This topic explains how to add to the bpmn diagram custom data.
 
It also describes how to display and interact with that custom data.
 
 
The reader should be familiar with the [http://www.eclipse.org/emf/ Eclipse Modeling Framework (EMF)] and in some cases the [http://www.eclipse.org/gmf/ Graphical Modeling Framework (GMF)] and the [http://www.eclipse.org/gmf/ Graphical Editing Framework (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.
 
 
* Displaying 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. You can edit this value and it will mark the editor dirty.
 
 
[[Image:Bpmn view.jpg]]
 
 
* 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, we have implemented an extension point: org.eclipse.stp.bpmn.diagram.EAnnotationDecorator.
 
You can have a look at it here : http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.stp.bpmn/org.eclipse.stp.bpmn.diagram/schema/EAnnotationDecorator.exsd?cvsroot=STP_Project
 
--[[User:Atoulme.intalio.com|Atoulme.intalio.com]] 15:31, 2 December 2006 (EST) will change to direct link when in documentation
 
 
The EAnnotation decorator extension point register a decorator for an annotation source. It then instanciates the IEAnnotation class declared in the extension point.
 
See http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.stp.bpmn/org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/dnd/IEAnnotationDecorator.java?cvsroot=STP_Project
 
 
--[[User:Atoulme.intalio.com|Atoulme.intalio.com]] 15:31, 2 December 2006 (EST) will change by direct link when in documentation
 
 
[[Image:Decorated icon.jpg]]
 
 
* Annotating the elements: 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, you can have a look at it here:
 
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.stp.bpmn/org.eclipse.stp.bpmn.diagram/schema/EAnnotationDragAndDrop.exsd?cvsroot=STP_Project
 
 
You will have to declare a IGenericEAnnotationDndHandler instance in your extension point that will provide callback method when the drop edit policy on the shape is asked for a command. The javadoc is pretty much explicit there. However, when coding the doPerformDrop method, you will have to use the GMF and GEF standards on the context handling.
 
You are in a read-only context in this case, so you should add commands to the CompoundCommand that is given to you in parameter.
 
If those commands are found to be non-executable, the drop will be canceled.
 
 
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.stp.bpmn/org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/dnd/IGenericEAnnotationDndHandler.java?cvsroot=STP_Project
 
 
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.
 
 
   
 
[[Image:FeedbackonDnD.jpg]]
 
 
* More on the drag and drop extensibility
 
 
A simple implementation is provided in the org.eclipse.stp.bpmn.diagram plugin.
 
An article is being drafted to present it: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=165083
 
 
* 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.
 
 
  
 
== Links ==
 
== Links ==
Line 206: Line 47:
 
* The [http://www.eclipse.org/stp/bpmn/index.php STP BPMN Modeler Overview].
 
* The [http://www.eclipse.org/stp/bpmn/index.php STP BPMN Modeler Overview].
  
== Connecting to the modeler ==
+
[[Category:BPMN]]
* BPMN Generator
+
[[Category:STP]]
 
+
We created a BPMN factory that generates fragments of BPMN imported into a diagram.
+
 
+
* Generator sample
+
This sample generates some BPMN out of a BPEL file.
+
BPEL (Business Process Executable Language) is a XML based standard for the execution of business processes.
+
In this scenario, a BPEL process is instrumented into a BPMN pool. It exposes the sequences and gateways of the BPEL as BPMN shapes.
+
It keeps annotations that link to the original BPEL markup.
+
See this [https://bugs.eclipse.org/bugs/show_bug.cgi?id=171084 bug] to keep track on it.
+
 
+
Here is the BPEL file we are going to generate BPMN from:
+
 
+
 
+
  <?xml version="1.0" encoding="utf-8"?>
+
  <bpel:process>
+
  <bpel:scope>
+
    <bpel:sequence>
+
    <bpel:scope>
+
    <bpel:sequence>
+
    <bpel:assign/>
+
      <bpel:assign/>
+
      </bpel:sequence>
+
    </bpel:scope>
+
      <bpel:assign/>
+
      <bpel:assign/>
+
      <bpel:sequence>
+
      <bpel:assign/>
+
      <bpel:assign/>
+
      <bpel:scope>
+
      <bpel:sequence>
+
    <bpel:assign/>
+
      <bpel:assign/>
+
      </bpel:sequence>
+
      </bpel:scope>
+
      </bpel:sequence>
+
    </bpel:sequence>
+
  </bpel:scope>
+
  </bpel:process>
+
 
+
Here is the BPMN generated out of it:
+
[[Image:generatedBPEL.png]]
+

Latest revision as of 06:28, 21 February 2008

  • Quick access

STP BPMN Presentation

STP BPMN Presentation (Part 1)

STP BPMN Presentation (Part 2)

STP BPMN Presentation (Part 3)

Eclipse con 2007 STP BPMN Tutorial (Setup)

STP BPMN Presentation Hands on tutorial

From Modeling to Execution in the Enterprise -- using BPMN and BPEL

Introduction to the modeler

The modeler has been developed based on GMF, which stands for Graphical Modeling Framework. GMF is an open source project taking place in the Eclipse Foundation. It reuses and extends two other Eclipse projects, GEF (Graphical Editing Framework) and EMF (Eclipse Modeling Framework).

The modeler is developed as a subproject of the STP project, ie the SOA Tools Platform project.

The goal of this modeler is to provide a graphical notation to express processes. Its second goal is to provide enough extensibility so that it can be reused to generate executable code.

The team counts two committers, Alex Boisvert and Hugues Malphettes, and a contributor Antoine Toulme.

They all work for Intalio, Inc.

A first milestone of the project has been published in December. The project has adopted the STP lifecycle and should release a 1.0 version sometime in Q2 this year.

You can access the builds on this page.

BPMN

BPMN stands for Business Process Modeling Notation. It has been developed by the Business Process Modeling Initiative, which has merged since with the OMG. The modeler does not implement fully the specification yet.


Take a peek at the object model of the BPMN diagram editor:

BpmnObjectModel.gif

The tool is responsible for the validation and enforcing the constraints defined by the specification.

Links