This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit

Invoking the API Manager from the BPEL Engine

Once the workflow configurations are finalized at the BPEL, the call-back URL of the APIM, which is originally configured in the <APIM_HOME>/repository/conf/api-manager.xml file and sent to the BPEL engine in the outflow will be called to progress the workflow. In APIM, the endpoint is available in both SOAP and REST variants as follows:

Both the endpoints are secured via basic authentication. Therefore, when you invoke either endpoint, you need to include an authorization header with a base64-encoded value of the username and password with the request. E.g., Authorization: Basic <base64 encoded username:password> .

The endpoint expects the following list of parameters:

The unique identifier sent to the BPEL against which the workflow is tracked in API ManagerYES
The next status to which the workflow needs to be promoted to.YES
Notes, that may need to be persisted against a particular workflow.NO

A sample curl request for invoking the REST endpoint is as follows:

curl -H "Authorization:Basic YWRtaW46YWRtaW4=" -X POST http://localhost:9763/store/site/blocks/workflow/workflow-listener/ajax/workflow-listener.jag -d 'workflowReference=b530be39-9174-43b3-acb3-2603a223b094&status=APPROVED&description=DESCRIPTION'

A sample SOAP request is given below:

<soapenv:Envelope xmlns:soapenv="" xmlns:cal="">