This documentation is for WSO2 Enterprise Integrator version 6.1.1 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
Skip to end of metadata
Go to start of metadata

This tutorial guides you on how to create a BPEL process using the WSO2 EI tooling

Before you begin,

  1. Install Oracle Java SE Development Kit (JDK) version 1.8.* and set the JAVA_HOME environment variable.
  2. Download the WSO2 EI ZIP file from here, and then extract the ZIP file. 
    The path to this folder will be referred to as <EI_HOME> through out this tutorial.
  3. Select and download the relevant EI tooling ZIP file based on your operating system from here and then extract the ZIP file.
    The path to this folder will be referred to as <EI_TOOLING> through out this tutorial.

This tutorial includes the following sections:

Creating the process

  1. In WSO2 EI Tooling, to create a business process, follow the steps below. 
    1. Right-click on the Project Explorer and go to New -> Project.

    2. Clicking project opens the New Project window
    3. Click Next and client creates the BPEL project.
  2. Generate a business process with the synchronous business process template. Use the following steps to accomplish this.
    1. Select a wizard from the subsequent screen that appears after creating the BPEL project.
    2. Select the New BPEL Process File and click Next.
    3. In the resulting screen, enter the BPEL Process Name, the Namespace and the Template as shown in the below image.
    4. Click Next.
    5. Create a WSDL file by filling out the Service NamePort NameService Address and Binding Protocol as shown in the following image.
    6. Click Next and finish the process. The following screen appears.

  3. Drag and drop ReceiveAssign and Reply activities such that you get the following process.
  4. Click on the Assign activity and assign ‘input’ from the input variable to ‘result’ from the output variable.

  5. Similarly, complete the next ReceiveAssign and Reply activity by using the same partner link ‘client’. Now you have completed the process logic. Next you need to add the correlation set to two Receive activities.
  6. Create a correlation set by clicking on the ‘+’ sign next to Correlation Sets.
  7. Select the correlation set and select Properties and click Add.

  8. You see the Select a Property wizard. Click New.
  9. Give a Name to our correlation property and select Simple Type under the Defined As section.
  10. Select the data type for our correlation property. In this instance, you have selected a ‘Simple Type’.
  11. Click Browse. Now we have to select the data type from XML schema types. Select string as our type.
  12. Click OK. Now a pop up box appears and asks for the prefix to be used to the XML schema namespace. Enter the prefix as ‘xsd’. 
  13. Click on the New button next to Alias to define the property alias. The Create Property Alias window appears.
  14. Select Message Type from the available options.
  15. Click on Browse. Also select input string for query.
  16. Click OK and finish the process.
  17. Now you have finished defining the correlation set, property and alias. 

    Note that you selected only one alias here because you are using the same message for both receive activities.

    Now we have to add the correlation set to the receive activities. On the first Receive activity, which creates the process instance, initialize the correlation set. On the next, Receive activity; it is not necessary to initialize the correlation set. Click on the Receive activity, and go to Properties, click Add and select the correlation set. Since there is only one correlation set, it is the only one that appears. On the Initiation section select Yes.

  18. On the next correlation activity, set Initiation to No.
  19. Next, generate the deployment descriptor.

  20. Next select all files related to the project and create a ZIP package.  

Deploying the process using EI-Business Process runtime

  1. Start the EI-Business Process runtime by going to <EI_HOME>/wso2/business-process/bin  and using the command line terminal and executing one of the following commands:
    • On Linux/Mac OS:  sh
    • On Windows:  wso2server.bat --run

  2. In a new browser window or tab, open  https://localhost:9445/carbon/  and log into the EI-Business Process management console using admin for both the username and password
  3. In the management console, navigate to Home -> Manage -> Processes ->Add -> BPEL and upload the BPEL package.
    Once the process is deployed successfully, you can use tryit to send a request to the process .

  4. Now navigate to the instance view for this process. The instance has completed up to the Reply activity and is waiting on the next Receive activity. Under the correlation properties, you can see the value sent in the request.

  5. Now send the same request from tryit again. The process instance has gone to the completed state. You can follow the same steps used here to add correlation sets to any asynchronous business process you implement. Correlation sets can be added to ‘receive’, ‘invoke’ and ‘pick’ activities.
  • No labels