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

Working with SOAP Tasks

BPMN SOAP tasks allow you to invoke SOAP endpoints within your BPMN processes. You can achieve this by adding a SOAP Task and handling the SOAP invocation part in a process implementation. This tutorial simulates the scenario of invoking the echo SOAP service, which is shipped with WSO2 EI by default.

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.
    Let's call the installation location of your product the <EI_HOME> directory.

    If you installed the product using the installer, this is located in a place specific to your OS as shown below:

    OSHome directory
    Mac OS/Library/WSO2/EnterpriseIntegrator/6.5.0
    WindowsC:\Program Files\WSO2\EnterpriseIntegrator\6.5.0\
    Ubuntu/usr/lib/wso2/EnterpriseIntegrator/6.5.0
    CentOS/usr/lib64/EnterpriseIntegrator/6.5.0

Creating the BPMN artifacts

Follow the steps below to create the BPMN artifacts including the SOAP Task.

  1. Create a new BPMN project named SoapTaskBPMN. For instructions, see Creating a BPMN Project.
  2. Create a BPMN Diagram named SoapTask.bpmn. For instructions, see Creating the BPMN Diagram.
  3. Click anywhere on the canvas, go to the Properties tab, and fill in the following details:
    Id               : soapTask
    Name         : SOAP Task Process
    Namespacehttp://wso2.org/bpmn/soapTask
  4. To implement the order approval process, drag and drop a Start Event element, a SOAP Task element, a User Task element and an End Event element to the canvas. 

    You view the Create connection option when you hover the mouse pointer on an artifact. Click on the arrow, drag it and drop it on the artifact to which you want to connect it.

Configuring the SOAP Task

  1. Select the Properties tab of the REST Task, click General and enter the Name as Echo Request.
  2. In the Properties tab of the SOAP Task, click Main config and update the following: 

    Service URLhttp://localhost:9765/services/echo.echoHttpSoap11Endpoint/
    Input Payload

    <echo:echoInt xmlns:echo="http://echo.services.core.carbon.wso2.org">
    <!--Optional:-->
    <in>50</in>
    </echo:echoInt>

    Soap versionsoap11
    Output Variable nameresponse
    Soap actionurn:echoInt

     More information on the properties of the SOAP Task

    After adding the SOAP Task to your BPMN Diagram, you can configure the below Properties appropriately, as explained below.

    Field NameString ValueRequired/Optional
    Service URL URL of the target endpoint

    Optional

    You can give this instead of the Service Reference (EPR).

    Service Reference (EPR)

    Registry resource path of the endpoint reference.


    Optional

    You can give this instead of the Service URL.

    Input PayloadRequest payloadOptional
    SOAP HeadersSOAP header block, which is attached to the SOAP header when creating the SOAP requestOptional
    SOAP versionSoap version to be used when creating the SOAP request (i.e., SOAP11 or SOAP12)Required
    HTTP ConnectionControl options for the current connection. ('keep-alive' is the the default value.)Optional
    HTTP Transfer EncodingThe form of encoding, which is used to safely transfer the entity to the userOptional
    Output Variable nameName of the variable to save the responseRequired
    Transport headers

    Header values in the format

    "headerName0":"headerValue0","headerName1":"header Value2"

Configuring the User Task

  1. Select the Properties tab of the User Task, click General and enter the Name as Echo Response.
  2. Click Properties, click Main config  and give admin as the Assignee
  3. In the Properties tab click Form, click New and add the following.

    IdNameTypeVariableReadableWritableRequired
    responseEcho ResponsestringresponseTrueFalseTrue

    You view the field added to the Form of the User Task as shown below.

  4. Press Ctrl+S to save all your artifacts.

Deploying the artifacts

  1. For instructions on creating the deployable artifacts, see Creating the deployable archive.
  2. For instructions on deploying them, see Deploying BPMN artifacts.

Testing the output

  1. If you have not started the business profile previously, you need to start it.

  2. Log in to the BPMN-explorer at https://localhost:9445/bpmn-explorer using admin for both the username and password.
  3. Click PROCESSES in the top menu, and click the Start option of the REST Task Process.

    This creates a Claimable Task.
  4. Click TASKS in the top menu, and then click Claimable Tasks
  5. Click on the new Claimable Task.
    You view the response of the Echo Service.

  6. Click Complete Task, to approve the appointment.
  7. Click TASKS → COMPLETED TASKS to view the completed task.
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.