Configuring Workflows in a Cluster
If you are working in a clustered API Manager setup with the API Store, Publisher, Gateway and Key Manager in separate servers, do the workflow configurations that are discussed in the previous topics in the API Store node. In addition, do the following configurations.
In this guide, you access the Admin Dashboard (https://<Server Host>:9443/admin-dashboard) Web application using the same node as the API Publisher. This is recommended because workflow management is an administrative task and is meant to reside within a private network as the Publisher. Typically, the Admin Dashboard from the same user store as the API Manager. Therefore, you can use the Admin Dashboard residing in the Publisher node instead of having it separately. This eliminates the need for a dedicated workflow management node. You need a dedicated node if the Admin Dashboard users reside in a separate user store.
If you want to change the user roles that can access the Admin Dashboard, open the
<APIM_HOME>/repository/deployment/server/jaggeryapps/admin-dashboard/site/conf/site.jsonfile that is in the node from where you access the Admin Dashboard (the API Publisher node in this example) and change itsAllowed Rolesparameter. You can add multiple user roles as a comma-separated list.- By default, workflow related configuration files have the port of the Business Process Server with an offset of 2. If you set up the BPS with a different port offset, change the workflow server URLs in the site.json file accordingly.
Point the
<Address>sub element of the <endpoint> element to the API Store node in the<APIM_HOME>/repository/deployment/server/synapse-configs/default/proxy-services/WorkflowCallbackService.xmlfile of the API Store node.<endpoint> <address uri="https://localhost:9443/store/site/blocks/workflow/workflow-listener/ajax/workflow-listener.jag" format="rest"/> </endpoint>
Add the IP address and the port of the API Store to the
<Address>element of the .epr file of the workflow that you configure. You can find the .epr file by the name of the workflow in the<APIM_HOME>/business-processes/eprfolder.Go to the
<APIM_HOME>/business-processes/<workflow name>/BPELfolder and unzip the file that is there by the name of the workflow. For example,<APIM_HOME>/business-processes/user-signup/BPEL/UserSignupApprovalProcess_1.0.0.zip.Go inside the unzipped folder and do the following:
Action Example Open the ApprovalTask WSDL file and point the address elements of the server where the BPEL runs. In the
<APIM_HOME>/business-processes/user-signup/BPEL/UserSignupApprovalProcess_1.0.0/UserApprovalTask.wsdlfile:<wsdl:service name="UserApprovalService"> <wsdl:port name="UserApprovalPort" binding="tns:UserApprovalBinding"> <soap:address location="http://localhost:9765/services/UserApprovalService" /> </wsdl:port> </wsdl:service> <wsdl:service name="UserApprovalServiceCB"> <wsdl:port name="UserApprovalPortCB" binding="tns:UserApprovalBindingCB"> <soap:address location="http://localhost:9765/services/UserApprovalServiceCB" /> </wsdl:port> </wsdl:service> </wsdl:service>Note that all workflow process services of the BPS run on port 9765 because you changed its default port (9763) with an offset of 2.
Open the CallbackServiceWSDL file and point the address elements to the API Store node in NIO port.In the
<APIM_HOME>/business-processes/user-signup/BPEL/UserSignupApprovalProcess_1.0.0/WorkflowCallbackService.wsdlfile:<wsdl:service name="WorkflowCallbackService"> <wsdl:port name="WorkflowCallbackServiceHttpsSoap11Endpoint" binding="ns:WorkflowCallbackServiceSoap11Binding"> <soap:address location="https://localhost:8243/services/WorkflowCallbackService.WorkflowCallbackServiceHttpsSoap11Endpoint"/> </wsdl:port> <wsdl:port name="WorkflowCallbackServiceHttpSoap11Endpoint" binding="ns:WorkflowCallbackServiceSoap11Binding"> <soap:address location="http://localhost:8280/services/WorkflowCallbackService.WorkflowCallbackServiceHttpSoap11Endpoint"/> </wsdl:port> <wsdl:port name="WorkflowCallbackServiceHttpsSoap12Endpoint" binding="ns:WorkflowCallbackServiceSoap12Binding"> <soap12:address location="https://localhost:8243/services/WorkflowCallbackService.WorkflowCallbackServiceHttpsSoap12Endpoint"/> </wsdl:port> <wsdl:port name="WorkflowCallbackServiceHttpSoap12Endpoint" binding="ns:WorkflowCallbackServiceSoap12Binding"> <soap12:address location="http://localhost:8280/services/WorkflowCallbackService.WorkflowCallbackServiceHttpSoap12Endpoint"/> </wsdl:port> <wsdl:port name="WorkflowCallbackServiceHttpsEndpoint" binding="ns:WorkflowCallbackServiceHttpBinding"> <http:address location="https://localhost:8243/services/WorkflowCallbackService.WorkflowCallbackServiceHttpsEndpoint"/> </wsdl:port> <wsdl:port name="WorkflowCallbackServiceHttpEndpoint" binding="ns:WorkflowCallbackServiceHttpBinding"> <http:address location="http://localhost:8280/services/WorkflowCallbackService.WorkflowCallbackServiceHttpEndpoint"/> </wsdl:port> </wsdl:service>Go to the
<APIM_HOME>/business-processes/<workflow name>/HumanTaskfolder and unzip the file that is there by the name of the workflow. For example,<APIM_HOME>/business-processes/user-signup/HumanTask/UserApprovalTask-1.0.0.zip.Go inside the unzipped folder and do the following:
Action Example If you changed the default admin role, open the ApprovalTaskHT file and apply the changes there.Change the admin instances in
<APIM_HOME>/business-processes/user-signup/HumanTask/UserApprovalTask-1.0.0/UserApprovalTask.htfile. Here's an example, assuming that the new admin role isapimadmin.<htd:peopleAssignments> <htd:potentialOwners> <htd:from logicalPeopleGroup="admin"> <htd:argument name="role">apimadmin</htd:argument> </htd:from> </htd:potentialOwners> </htd:peopleAssignments>Open the ApprovalTaskWSDL file and point the two address elements to the Business Process Server node.In the
<APIM_HOME>/business-processes/user-signup/HumanTask/UserApprovalTask-1.0.0/UserApprovalTask.wsdlfile:<wsdl:service name="UserApprovalService"> <wsdl:port name="UserApprovalPort" binding="tns:UserApprovalBinding"> <soap:address location="http://localhost:9765/services/UserApprovalService" /> </wsdl:port> </wsdl:service> <wsdl:service name="UserApprovalServiceCB"> <wsdl:port name="UserApprovalPortCB" binding="tns:UserApprovalBindingCB"> <soap:address location="http://localhost:9765/services/UserApprovalServiceCB" /> </wsdl:port> </wsdl:service>Note that all workflow process services of the BPS run on port 9765 because you changed its default port (9763) with an offset of 2.