This documentation is for WSO2 API Manager 2.1.0 View documentation for the latest release.
Page Comparison - Configuring Workflows for Tenants (v.9 vs v.10) - API Manager 2.1.0 - WSO2 Documentation

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOCUMENTATION-7167

...

  1. Set a port offset of 2 to the BPS using the <BPS_HOME>/repository/conf/carbon.xml file. This prevents any port conflicts when you start more than one WSO2 products on the same server.

  2. Log in to the API Manager's management console (https://localhost:9443/carbon) and create a tenant using the Configure -> Multitenancy menu.

  3. Create a copy of the BPEL located in <APIM_HOME>/business-processes/application-creation/BPEL.

  4. Extract the contents of the new BPEL archive.

  5. Copy ApplicationService.epr and ApplicationCallbackService.epr from <APIM_HOME>/business-processes/epr folder to the folder extracted before. Then, rename the two files as ApplicationService-Tenant.epr and ApplicationCallbackService-Tenant.epr respectively.

  6. Open ApplicationService-Tenant.epr and change the wsa:Address to http://localhost:9765/services/t/<tenant domain>/ApplicationService and add the tenant admin credentials.

    Info

    In a distributed setup, the ApplicationService-Tenant.epr's wsa:Address should point to the proxy/load balancer of Business Process Server(BPS cluster) (http://<BPS_LB_hostname_here>/services/t/<tenant domain>/ApplicationService). Also, the ApplicationCallbackService-Tenant.epr's wsa:Address should point to APIM cluster's Workflow Callback service endpoint. This is normally deployed at the gateway nodes. The wsa:Address should point to the gateway nodes. (https://<API_gateway_LB_hostname_here>/services/WorkflowCallbackService) and the user credentials which grant access to that service should be used.

  7. Point the deploy.xml file of the extracted folder to the new .epr files provided in the BPEL archive. For example,

    Code Block
    languagexml
    <invoke partnerLink="AAPL">
       <service name="applications:ApplicationService" port="ApplicationPort">
          <endpoint xmlns="http://wso2.org/bps/bpel/endpoint/config" endpointReference="ApplicationService-Tenant.epr"></endpoint>
       </service>
    </invoke>
    
    <invoke partnerLink="CBPL">
       <service name="callback.workflow.apimgt.carbon.wso2.org:WorkflowCallbackService" port="WorkflowCallbackServiceHttpsSoap11Endpoint">
          <endpoint xmlns="http://wso2.org/bps/bpel/endpoint/config" endpointReference="ApplicationCallbackService-Tenant.epr"></endpoint>
       </service>
    </invoke>
    
  8. Zip the content and create a BPEL archive in the following format:

    Code Block
    ApplicationApprovalWorkFlowProcess_1.0.0-Tenant.zip
         |_ApplicationApprovalWorkFlowProcess.bpel 
         |_ApplicationApprovalWorkFlowProcessArtifacts.wsdl 
         |_ApplicationCallbackService-Tenant.epr
         |_ApplicationService-Tenant.epr
         |_ApplicationsApprovalTaskService.wsdl 
         |_SecuredService-service.xml
         |_WorkflowCallbackService.wsdl 
         |_deploy.xml   
    
  9. Log into the BPS as the tenant admin and upload the BPEL. 

Creating a Tenant for Authentication

Step 1: Create a registry resource in the tenant's configuration registry
  1. Start the BPS server If it is not started already.

    Warning

    If you are using Mac OS with High Sierra, you may encounter following warning when login into the Management console due to a compression issue exists in High Sierra SDK.

    Code Block
    WARN {org.owasp.csrfguard.log.JavaLogger} -  potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:xxx.xxx.xx.xx, method:POST, uri:/carbon/admin/login_action.jsp, error:required token is missing from the request)

    To avoid this issue open <BPS_HOME>/repository/conf/tomcat/catalina-server.xml and change the compression="on" to compression="off" in Connector configuration and restart the BPS.

  2. Navigate to Registry>Browse in the Main menu of the management console and click on /_system/config.
  3. Click on Entries>Add Resource and fill the form using the values listed below for guidance. See Adding a Resource for more information. 

    MethodNameMedia Type
    Create Text ContentTaskCoordinationtext/plain
  4. Click Add to finish adding the resource.

...