Plugging an External BPEL Workflow
Introduction
This sample demonstrates how to plug an external BPEL workflow into the user creation and user self-subscription process of WSO2 API Manager. This sample BPS workflow described here contains back-end services where the sample workflow accepts Web service calls from the API Manager when the user creation process starts. It then calls the sample echo service hosted in WSO2 Stratos Live (https://stratoslive.wso2.com) to print messages to API Manager start-up console.
Prerequisites
- Java Development Kit/JRE version 1.6.* or 1.7.*
- Apache Maven 3.x.x or later.
- Download and extract WSO2 BPS binary distribution from http://wso2.com/products/business-process-server.
JDK and Maven setup instructions are given in section Installation Prerequisites.
Building the Sample
1. Download and install WSO2 API Manager. See instructions in Getting Started .2. Navigate to <APIM_HOME>/samples/BPSWorkFlow/UserCreation/UserCreationProcess folder using a command prompt (in Windows) or text Linux console (in Linux). Build the workflow sample from that location using the following command.
mvn clean install
Running the Sample
Deploying the BPEL Workflow
1. Go to WSO2 BPS distribution which was downloaded as a prerequisite. Open <BPS_HOME>/repository/conf/carbon.xml file and increase the port offset to a desired value. This is done to prevent port conflicts when two WSO2 Carbon-based instances (WSO2 AM and WSO2 BPS in this case) are running on the same machine.
<!-- Ports offset. This entry will set the value of the ports defined below to the define value + Offset. e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445--> <Offset>1</Offset>
2. Start WSO2 BPS by executing $BPS_HOME/bin/wso2server.sh (on Linux) or <BPS_HOME>/bin/wso2server.bat (on Windows).
<ServerURL>
tag to the value given below. This is the URL of the BPS server.
<WorkFlowExtensions> <SelfSignIn> <!--This propertey used to enable/disable user add listner--> <ProcessEnabled>true</ProcessEnabled> <!--This propertey used to specify business process server URL--> <ServerURL>https://localhost:9444/services/</ServerURL> <!--This propertey used provide username/ password if we invoke service in a secured way--> <UserName>admin</UserName> <Password>admin</Password> </SelfSignIn> </WorkFlowExtensions>
Invoking the Workflow
8. Start WSO2 AM by executing <APIM_HOME>/bin/wso2server.sh (on Linux) or <AM_HOME>/bin/wso2server.bat (on Windows).
https:
//<YourHostName>:9443/store
) in a Web browser and self-subscribe by clicking the Sign-up link at the top of the screen.