Task: Create a Web Service Composition
Aim: Create and edit a composition model out of existing Web services to enable the combination and analysis of heterogeneous data based on the Business Process Modeling Notation (BPMN).
- The Resource Portlet has to be configured with the correct URL to a valid repository in the Java Content Repository (JCR)
- The Composition Portlet has to be in place. For example, use the Portal at envision.envip.eu and go to the “Composition” page.
A user can model a composition by using existing Web services. These services can be combined sequentially or in parallel to model the behaviour of a new composite service. From this model, we can export BPEL workflows to produce an executable composition.
The user follows this general procedure to create a composite service:
- The User logs in to Oryx-ENVISION in the Composition Portlet by entering user id =oryx.myid.net in the top right corner. He clicks the login button next to the user id field. Then he clicks “Sign on to your OpenID”. If prompted for password then use password = envision. Now, the user is logged in to Oryx and can create and store a composition.
- A new composition is created by choosing the “Create New Model” on the left top corner. In the drop-down menu that appears, the user chooses “BPMN 2.0 Extended Processes”. By choosing “extended”, the user gets a BPMN model in which the ENVISION extensions can be used.
- He adds an “Expanded Subprocess” by clicking on this item within the “Activities” menu to the left and“drag and drops” it into to the model pane. The sub-process represents a container of the new composite service.The User goes to the properties view of the sub-process, which can be seen on the right hand side after selecting the sub-process by a single click in the model view. In the property view of the sub-process, it is necessary to give values to the name and namespace properties.
- Next, it is natural to define the internal behavior of the composite service. The User selects a “Start Event” from the “Start Events” menu found on the left hand side, and drags it into the sub-process. Similarly, he inserts an end event into the sub-process by selecting the “End Event” from the “End Events” menu.
- The next step is to import the services that are used in a service chain to generate the behavior of the new composition. This is done by switching to the Resource Module and searching for resources. The User selects the relevant resources and sends it to Composition Module. This can be achieved by clicking on the right arrow on the bottom right of the resource module. He chains the selected services together through control flow by selecting “Sequence Flow” in the “Connecting Objects” menu. He chains the data objects together by selecting “Association (unidirectional)”.
- Once the internal behavior of the composite service has been defined, it is time to specify the interface by adding input and output data objects by selecting the “Data Object” from the “Data Objects” menu on the left hand side. These are then normally connected to internal data objects inside the sub-process by using data flow. When the composition model is completed and a mapping is specified for each input data object, a BPEL file and a WSDL file can be generated.
- The modeler needs to go through a few manual steps before he can access the deployment services. He clicks on the “Add additional plugins dynamically” button on the top menu (left hand side of next figure). In the pop-up that appears (right hand side of next figure), the “ORYX.Plugins.BPMN2_0Serialization” is ticked. This leads to a new button with the drop-down menu. He can generate BPEL and WSDL and upload the new composed service into the Resource Portlet by choosing “Upload as resource”.
To edit an existing service composition, the user must login to Oryx-ENVISION as described in the first step above, and then double-click on one of the existing models. Now this model is ready to be edited by following any steps in 3-7 above, in addition to deleting objects as desired.
We now go through the steps for how to make a concrete example composition model for a simplified version of the ENVISION pilot called Land Slide (see figure bellow). In some places we refer to the steps from the general procedure above:
- Go to envision.envip.eu
- Login as email@example.com
- Passsword = 47UjY5WX
- Choose the Composition tab.
- Click OK on three to four database messages
- Login to Oryx with user id = oryx.myid.net, password = envision.
- Follow steps 2 and 3 of the general procedure. Use namespace=” www.brgm.fr/envision/landslide”, name=”landSlide”, and wsdl=”Landslide.wsdl” as properties of the “Expanded Subprocess” created in step 3 of the general procedure.
- Follow step 4 of the general procedure.
- Follow step 5 of the general procedure by selecting the Precipitation and Hydrological Modelling services from the Resource Portlet, respectively.
- Follow step 6 of the general procedure. Add two input data objects with names dfrom and dto, respectively. Each shall have type=”xsd:dateTime”. Add also an output data object with name=”landSlideOutput”, where the type can be unspecified.
- Follow step 7 of the general procedure. Save the BPEL result as “Landslide.bpel” and the WSDL result as “Landslide.wsdl”