...
Table of Contents | ||
---|---|---|
|
Creating the BPMN artifacts
Follow the steps below to create the BPMN artifacts including the SOAP Task.
- Create a new BPMN project named SoapTaskBPMN. For instructions, see see Creating a BPMN Project.
- Create a BPMN Diagram named SoapTask.bpmn. For instructions, see see Creating the BPMN Diagram.
- Click anywhere on the canvas, go to the Properties tab, and fill in the following details:
Id :soapTask
Name :SOAP Task Process
Namespace:http://wso2.org/bpmn/soapTask
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.
Tip 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
- Select the Properties tab of the REST Task, click General and enter the Name as Echo Request.
In the Properties tab of the SOAP Task, click Main config and update the following:
Service URL http://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 version soap11 Output Variable name response Soap action urn:echoInt
Expand title 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 Name String Value Required/Optional Service URL URL of the target endpoint Optional
Tip You can give this instead of the Service Reference (EPR).
Service Reference (EPR) Registry resource path of the endpoint reference.
Optional
Tip You can give this instead of the Service URL.
Input Payload Request payload Optional SOAP Headers SOAP header block, which is attached to the SOAP header when creating the SOAP request Optional SOAP version Soap version to be used when creating the SOAP request (i.e., SOAP11 or SOAP12) Required HTTP Connection Control options for the current connection. ('keep-alive' is the the default value.) Optional HTTP Transfer Encoding The form of encoding, which is used to safely transfer the entity to the user Optional Output Variable name Name of the variable to save the response Required Transport headers Header values in the format
Code Block language js "headerName0":"headerValue0","headerName1":"header Value2"
Configuring the User Task
- Select the Properties tab of the User Task, click General and enter the Name as Echo Response.
- Click Properties, click Main config and give
admin
as the Assignee. In the Properties tab click Form, click New and add the following.
Id Name Type Variable Readable Writable Required response Echo Response string response True False True You view the field added to the Form of the User Task as shown below.
Press Ctril+S to save all your artifacts.
Deploying artifacts of the
...
BPMN Project
- For instructions on creating the deployable artifacts, see /wiki/spaces/EI6xx/pages/49615043Creating the deployable archive.
- For instructions on deploying them, see /wiki/spaces/EI6xx/pages/49615043Deploying BPMN artifacts.
Testing the output
- Log in to the BPMN-explorer at https://localhost:9445/bpmn-explorer using
admin
for both the username and password. - Click PROCESSES in the top menu, and click the Start option of the REST Task Process.
This creates a Claimable Task. - Click TASKS in the top menu, and then click Claimable Tasks.
Click on the new Claimable Task.
You view the response of the Echo Service.- Click Complete Task, to approve the appointment.
- Click TASKS → COMPLETED TASKS to view the completed task.