This section explains how to attach a custom workflow to the application registration operation in the API Manager. First, see Workflow Extensions for information on different types of workflow executors.
Introduction to Application
...
registration (Key generation) workflow
Application creation and Application registration are different workflows. After an application is created, you can subscribe to available APIs, but you get the consumer key/secret and access tokens only after registering the application. There are two types of registrations that can be done to an application: production and sandbox. You change the default application registration workflow in situations such as the following:
...
Tip |
---|
Before you begin, if you have changed the API Manager's default user and role, make sure you do the following changes: - Change the credentials of the workflow configurations in the registry resource
_system/governance/apimgt/applicationdata/workflow-extensions.xml .
a. Login to the Management console of WSO2 API Manager in https://localhost:9443/carbon. b. Click on browse under Resources in left Navigation under mail tab. c. Go to /_system/governance/apimgt/applicationdata/workflow-extensions.xml location in registry browser and open the workflow-extensions.xml clicking Edit as text. d. Uncomment the following two sections and change the credentials of API Manager's default user credetials you have given. Warning |
---|
This configuration is provided assuming that WSO2 BPS is running with offset 2. If you are running WSO2 BPS in a different offset change the port of serviceEndpoint properties in following configuration according to the changed port offset. |
Code Block |
---|
<ProductionApplicationRegistration executor="org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationWSWorkflowExecutor">
<Property name="serviceEndpoint">http://localhost:9765/services/ApplicationRegistrationWorkFlowProcess/</Property>
<Property name="username">admin</Property>
<Property name="password">admin</Property>
<Property name="callbackURL">https://localhost:8248/services/WorkflowCallbackService</Property>
</ProductionApplicationRegistration>
<SandboxApplicationRegistration executor="org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationWSWorkflowExecutor">
<Property name="serviceEndpoint">http://localhost:9765/services/ApplicationRegistrationWorkFlowProcess/</Property>
<Property name="username">admin</Property>
<Property name="password">admin</Property>
<Property name="callbackURL">https://localhost:8248/services/WorkflowCallbackService</Property>
</SandboxApplicationRegistration> |
Note |
---|
Make sure to comment out the existing ProductionApplicationRegistration and SandboxApplicationRegistration executors as shown below. Code Block |
---|
<!--ProductionApplicationRegistration executor="org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor"/-->
<!--SandboxApplicationRegistration executor="org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor"/--> |
|
- Point the database that has the API Manager user permissions to BPS.
- Share any LDAPs, if exist.
Unzip the <API-M>/business-processes/application-registration/HumanTask/ApplicationRegistrationTask-1.0.0.zip file, update the role as follows in the ApplicationRegsitrationTask.ht file, and ZIP the ApplicationRegistrationTask-1.0.0 folder. Code Block |
---|
| <htd:argument name="role">
[new-role-name]
</htd:argument> |
|
Configuring the Business Process Server
...