Labels

Sunday, June 26, 2016

Enabling APIM - BPS Workflow Integration In a Cluster + WSO2

Hi All,

This Post show how you could configure WSO2 APIM workflows in a cluster.
Please Note this post is based on the bellow documentation, more like a summary of what you really should do.
https://docs.wso2.com/display/AM1100/Configuring+Workflows+in+a+Cluster
https://docs.wso2.com/display/AM1100/Adding+an+Application+Creation+Workflow

WSO2 Product Versions -
wso2bps 3.5.1
wso2am 1.10.0

Setup Information

  1. 2 bps nodes clustered with a LB
  • <bps1 IP> hostname /IP of the bps node 1
  • <bps2 IP> hostname /IP of the bps node 2
  • <bpsLB IP> hostname /IP of the bps LB
  1. 2 APIM store nodes clustered  with a LB

Important Notes -

  • Assuming that the admin role is not changed.
  • All bps and apim nodes are running in a separate servers and started using offset 0
  • Configuring the Admin Dashboard in store side.
  • Please note both nodes should have the correct server certificates and the client-truststore should know both sides as well

Setting up APIM store node

  1. Change the workFlowServerURL in the admin dashboard configuration. wso2am-1.10.0/repository/deployment/server/jaggeryapps/admin-dashboard/site/conf/site.json
"workFlowServerURL": "https://<bpsLB>:9443/services/",
  1. Changed the WorkflowCallbackService.xml to point the store node.
Since we are configuring the admin-dashboard of the store side, keeping it as  localhost:9443
/wso2am-1.10.0/repository/deployment/server/synapse-configs/default/proxy-services/WorkflowCallbackService.xml
  1. Login to the API Store management console and change the WorkFlowExtensions callbackURL and serviceEndpoint in the registry.
/_system/governance/apimgt/applicationdata/workflow-extensions.xml
E.g - comment the simple workflow executor and enable WS Workflow Executor

<ApplicationCreation executor="org.wso2.carbon.apimgt.impl.workflow.ApplicationCreationWSWorkflowExecutor">
        <Property name="serviceEndpoint"> http://<bpsLB IP>:9763/services/ApplicationApprovalWorkFlowProcess/  </Property>
        <Property name="username">userName</Property>
        <Property name="password">Password</Property>
        <Property name="callbackURL">https://<storeLB IP>:8243/services/WorkflowCallbackService</Property>
    </ApplicationCreation>

Setting Up BPS Node


  1. <BPS_HOME>/repository/conf/humantask.xml file and <BPS_HOME>/repository/conf/b4p-coordination-config.xml file and set the TaskCoordinationEnabled property to true.
<TaskCoordinationEnabled>true</TaskCoordinationEnabled>
  1. Copy the following from the <APIM_HOME>/business-processes/epr folder to the <BPS_HOME>/repository/conf/epr folder. If the <BPS_HOME>/repository/conf/epr folder does not exist, please create it.
  • In the *CallbackService.epr file change the Address to <storeLB ip> and  also change the username and password
  • In the *Service.epr change the  Address to store node ip or localhost and also change the username and password
  1. Unzip the <APIM_HOME>/business-processes/user-signup/BPEL/*  (Similar to all the other workflows)
  • Change the address port to 9443 in the ApprovalTask wsdl file e.g - UserApprovalTask.wsdl
  • In the CallbackService WSDL point the address elements to <storeLB IP>
  1. Zip back the files and upload it into the BPS.
  2. Unzip the <APIM_HOME>/business-processes/<workflow name>/HumanTask fie.
  • Change the port to 9763 in ApprovalTask WSDL
  1. Zip back the files and upload it into the BPS Human Task.

Create an Application In store side and login to the admin dashboard to check if workflows working properly.

Have Fun !!! 
 

No comments:

Post a Comment