Echoing a Message Using Correlation
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Echoing a Message Using Correlation

This tutorial guides you on how to create a BPEL process to assign a value in the request to the response and echo it using the WSO2 Enterprise Integrator (WSO2 EI) Tooling. It walks you through the steps to demonstrate how you can assign the input string of the request message to the result string of the response message using BPEL Correlation.

Also, if you are facing any problems with this Tutorial, you can import the pre-packaged project of this Tutorial to WSO2 EI Tooling, and compare your configurations with the ones in it.

Before you begin,

  • Install Oracle Java SE Development Kit (JDK) version 1.8.* and set the JAVA_HOME environment variable.

  • Download the product installer from here, and run the installer.

  • 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> throughout this tutorial.

This tutorial includes the following sections, which include instructions to create the below BPEL Workflow.

Creating the BPEL Workflow

Create a new BPEL Workflow using the below details.

  • Project Name: EchoCorrelationProcess

  • Process Name: EchoCorrelationProcess

  • Template: Synchronous BPEL Process

For instructions, see Creating a BPEL Workflow.

Creating the artifacts

Follow the steps below to create the required artifacts.

  1. Right click on the FIX_ME-Add_Business_Logic_Here element, and click Delete to remove it from the default diagram.

  2. Drag and drop an Assign activity to the canvas and place it after the receiveInput activity.

  3. Drag and drop an Receive activity to the canvas and place it after the replyOutput activity.

  4. Drag and drop another Assign activity to the canvas and place it after the Receive activity.

  5. Drag and drop a Reply activity to the canvas and place it after the Assign1 activity.
    You view the artifacts you added as shown below. 

Creating the variable

Follow the steps below to create a variable to temporarily store the values passed from the request message.

  1. In WSO2 EI Tooling under the EchoCorrelationProcess menu, click the + sign on the Variables panel, to add a new variable and name it tempVar.

  2. Click on the tempVar variable, and click Browse in the Details section of its Properties tab.

  3. Select From Imports under Show XSD Types, select the below Filters, select the string XML Schema under the Matches and click OK.

  4. Click OK in the message, which pops up.

Configuring the Partner Link

In this scenario, you are using the client Partner Link, which is available by default. Follow the steps to set the Service Role of it.

  1. In the EchoCorrelationProcess menu, click on the client Partner Link.

  2. Click Details in its Properties section and double click process under My Operations.

Configuring the receiveInput activity 

  1. Click on the receiveInput activity and in the  Details section of the Properties tab, select client as the  Partner Link.

  2. Select Process as the Operation.

  3. In the Quick Pick: box, expand the process → EchoAsyncProjectRequestMessage → payload : EchoAsyncProjectRequest drop down and double click on the process option.

Configuring the Assign activity

  1. Click on the Assign activity, click Details in the Properties tab, and click New.

  2. Click New and in the From: box, expand the input : EchoCorrelationProcessRequestMessage drop down and select the input : string option. 

  3. In the To: box, select tempVar : string.

  4. Press Ctrl+S to save the variable mapping. 

  5. Click New and in the From: box, expand the input : EchoCorrelationProcessRequestMessage drop down and select the input : string option. 

  6. In the To: box, expand the output : EchoCorrelationProcessResponseMessage drop down and select the result : string option. 

  7. Press Ctrl+S to save the variable mapping.

  8. Click Yes in the message, which pops up to initialize the variables.

  9. Click New and in the From: box, select Expression and enter concat('Instance created with correlationID: ', $tempVar) as the expression.

  10. In the To: box, expand the output : EchoCorrelationProcessResponseMessage drop down and select the result : string option. 

     

  11. Press Ctrl+S to save the variable mapping.

Configuring the replyOutput activity

  1. Click on the replyOutput activity and in the Details section of the Properties tab, select client as the Partner Link.

  2. Keep your cursor on the Operation field and double-click on process


  3. Double click process in the Quick Pick section to generate the input and output variables for this element.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.