Jump to: navigation, search

Difference between revisions of "STP/BPMN Component/STP BPMN Presentation (Part 2)"

 
(13 intermediate revisions by 4 users not shown)
Line 26: Line 26:
  
 
[[Image:ExportToImageWizard.png]]
 
[[Image:ExportToImageWizard.png]]
 +
 +
* Copy and paste shapes into a text processor
 +
Using the copy and paste command, GMF enables you to paste shapes into a word processor.
 +
 +
* Copy/paste in compartments
 +
We have a good support of copy and paste. GMF does not basically support the possibility to copy and paste elements in compartments because some rules apply depending of the object model.
 +
 +
In our case, we have the edges between the activities copied if the activities are copied, for example.
 +
 +
* Drag a shape from one container to another
 +
Just select a shape and drag it to another pool while pressing shift.
 +
 +
[[Image:DragBpmnShapeToOtherPool.png]]
 +
 +
 +
== Validation on BPMN diagrams ==
 +
 +
We haven't created all the constraints provided by the specification yet. We have implemented those who seemed critical to us at the time. You can access them through [Window] > [Preferences...] > [Model Validation] > [Constraints].
 +
 +
* Constraints overview
 +
 +
[[Image:ConstraintsBpmnOverview.png]]
 +
 +
* Problems decorations
 +
 +
The diagram is decorated with error or warning markers.
 +
 +
[[Image:DiagramWithErrorMarker.png]]
 +
 +
You can access the description of the error in the Problems view.
 +
 +
The validation is executed at build time, ie when you save if you build automatically, or when you type Ctrl+B.
 +
The builder nature is added to the project (exactly to the .project file) when creating the first bpmn_diagram file.
 +
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<projectDescription>
 +
    <name>myFirstProcess</name>
 +
      <comment></comment>
 +
        <projects>
 +
        </projects>
 +
        <buildSpec>
 +
              <buildCommand>
 +
                        <name>org.eclipse.stp.bpmn.validation.BatchValidationBuilder</name>
 +
                        <arguments>
 +
                        </arguments>
 +
              </buildCommand>
 +
        </buildSpec>
 +
        <natures>
 +
              <nature>org.eclipse.stp.bpmn.validation.BatchValidationBuildAbleNature</nature>
 +
        </natures>
 +
</projectDescription>
  
 
== Generating BPMN ==
 
== Generating BPMN ==
Line 36: Line 87:
 
In this scenario, a BPEL process is instrumented into a BPMN pool. It exposes the sequences and gateways of the BPEL as BPMN shapes.
 
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.
 
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 java class where we parse the BPEL and generate BPMN:
 +
http://dev.eclipse.org/svnroot/stp/org.eclipse.stp.bpmn/trunk/samples/org.eclipse.stp.bpmn.samples/src/org/eclipse/stp/bpmn/samples/bpel2bpmn/BPEL2BPMNGenerator.java
  
 
Here is the BPEL file we are going to generate BPMN from:
 
Here is the BPEL file we are going to generate BPMN from:
Line 42: Line 95:
  
 
   <?xml version="1.0" encoding="utf-8"?>
 
   <?xml version="1.0" encoding="utf-8"?>
  <bpel:process>
+
    <bpel:process >
  <bpel:scope>
+
      <bpel:scope name="cook a cake">  
    <bpel:sequence>
+
        <bpel:sequence>
    <bpel:scope>
+
          <bpel:scope name="find a recipe">
    <bpel:sequence>
+
            <bpel:sequence>
    <bpel:assign/>
+
                <bpel:assign name="search on the web"/>
      <bpel:assign/>
+
                <bpel:assign name="print recipe"/>
 +
          </bpel:sequence>
 +
          </bpel:scope>
 +
          <bpel:assign name="shop for ingredients"/>
 +
          <bpel:assign name="prepare the kitchen"/>
 +
          <bpel:scope name="cook recipe">
 +
          <bpel:assign name="melt flower with paper"/>
 +
          <bpel:assign name="add ingredients"/>
 +
          <bpel:scope name="bake cake">
 +
      <bpel:sequence>
 +
                  <bpel:assign name="heat the oven at 300F"/>
 +
                  <bpel:assign name="leave the cake in the oven for 30 minutes"/>
 
       </bpel:sequence>
 
       </bpel:sequence>
    </bpel:scope>
+
          </bpel:scope>
      <bpel:assign/>
+
          </bpel:scope>
      <bpel:assign/>
+
        </bpel:sequence>
      <bpel:sequence>
+
    </bpel:scope>
      <bpel:assign/>
+
     </bpel:process>
      <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:
 
Here is the BPMN generated out of it:
 
[[Image:generatedBPEL.png]]
 
[[Image:generatedBPEL.png]]
 +
 +
[[Category:BPMN]]
 +
[[Category:STP]]

Latest revision as of 06:40, 13 May 2008

  • Quick access

STP BPMN Presentation

STP BPMN Presentation (Part 1)

STP BPMN Presentation (Part 2)

STP BPMN Presentation (Part 3)

Editor functionalities

  • 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.

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.

ExportToImageWizard.png

  • Copy and paste shapes into a text processor

Using the copy and paste command, GMF enables you to paste shapes into a word processor.

  • Copy/paste in compartments

We have a good support of copy and paste. GMF does not basically support the possibility to copy and paste elements in compartments because some rules apply depending of the object model.

In our case, we have the edges between the activities copied if the activities are copied, for example.

  • Drag a shape from one container to another

Just select a shape and drag it to another pool while pressing shift.

File:DragBpmnShapeToOtherPool.png


Validation on BPMN diagrams

We haven't created all the constraints provided by the specification yet. We have implemented those who seemed critical to us at the time. You can access them through [Window] > [Preferences...] > [Model Validation] > [Constraints].

  • Constraints overview

ConstraintsBpmnOverview.png

  • Problems decorations

The diagram is decorated with error or warning markers.

DiagramWithErrorMarker.png

You can access the description of the error in the Problems view.

The validation is executed at build time, ie when you save if you build automatically, or when you type Ctrl+B. The builder nature is added to the project (exactly to the .project file) when creating the first bpmn_diagram file.

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
   <name>myFirstProcess</name>
     <comment></comment>
       <projects>
       </projects>
       <buildSpec>
              <buildCommand>
                       <name>org.eclipse.stp.bpmn.validation.BatchValidationBuilder</name>
                       <arguments>
                       </arguments>
              </buildCommand>
       </buildSpec>
       <natures>
              <nature>org.eclipse.stp.bpmn.validation.BatchValidationBuildAbleNature</nature>
       </natures>
</projectDescription>

Generating BPMN

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.

Here is the java class where we parse the BPEL and generate BPMN: http://dev.eclipse.org/svnroot/stp/org.eclipse.stp.bpmn/trunk/samples/org.eclipse.stp.bpmn.samples/src/org/eclipse/stp/bpmn/samples/bpel2bpmn/BPEL2BPMNGenerator.java

Here is the BPEL file we are going to generate BPMN from:


 <?xml version="1.0" encoding="utf-8"?>
   <bpel:process >
     <bpel:scope name="cook a cake"> 
       <bpel:sequence>
         <bpel:scope name="find a recipe">
            <bpel:sequence>
               <bpel:assign name="search on the web"/>
               <bpel:assign name="print recipe"/>
     	     </bpel:sequence>
         </bpel:scope>
         <bpel:assign name="shop for ingredients"/>
         <bpel:assign name="prepare the kitchen"/>
         <bpel:scope name="cook recipe">
     	     <bpel:assign name="melt flower with paper"/>
     	     <bpel:assign name="add ingredients"/>
     	     <bpel:scope name="bake cake">
     		<bpel:sequence>
                  <bpel:assign name="heat the oven at 300F"/>
                  <bpel:assign name="leave the cake in the oven for 30 minutes"/>
     		</bpel:sequence>
     	     </bpel:scope>
         </bpel:scope>
       </bpel:sequence>
    </bpel:scope>
   </bpel:process>

Here is the BPMN generated out of it: GeneratedBPEL.png