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

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

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

You can edit this service by opening the project using WSO2 Developer Studio.

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).

3. Log in to the WSO2 BPS management console (Instructions are same as for API Manager) and click the Add sub menu under the Processes menu, which is in the Main menu.
4. Navigate to the business process defined in UserCreationProcess.zip file at location <APIM_HOME>/samples/BPSWorkFlow/UserCreation/UserCreationProcess/target in WSO2 BPS, and click the "Upload" button.
5. Go to List menu under the Services menu. 
6. In the Deployed Services page that appears, you will see the UserCreationProcess deployed as a service.
7. To enable user add listener, there are additional configurations to be specified in the <APIM_HOME>/repository/conf/api-manager.xml file. Open the file, navigate to the following section and set the <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).

9. Log in to AM management console, navigate to Users and Roles sub menu under the Configure menu and add new users in the API Manager server.
10. Check instances created inside Business Process Server. You will see created instances and web service invocations that happen when we add new user into the system. For example,
11. Open the API Store (https://<YourHostName>:9443/store) in a Web browser and self-subscribe by clicking the Sign-up link at the top of the screen.
12. Check the created instances and web service invocations that happen when a new user subscribes to the system.
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.