Let's see how to add a user signup workflow.
- If API Manager and Business Process Server are running on the same machine, follow this step.
- If there is no directory called "epr" inside <BPS_HOME>/repository/conf/, then create it.
- Copy following epr files from APIM_HOME>/business-processes/epr to <BPS_HOME>/repository/conf/epr.
- UserSignupService.epr
- UserSignupProcess.epr
- Start BPS and login to Management console.
- Go to Home > Manage > Processes > Add > BPEL. Then, upload <APIM_HOME>/business-processes/user-signup/BPEL/UserSignupApprovalProcess_1.0.0.zip.
- Go to Home > Manage > Human Tasks >. Then, upload <APIM_HOME>/business-processes/user-signup/HumanTask/UserApprovalTask-1.0.0.zip.
- Start APIM and login to Management console.
- Go to Home > Resources > Browse and navigate to /_system/governance/apimgt/applicationdata/workflow-extensions.xml. Click on "Edit As Text".
- Comment <UserSignUp executor="org.wso2.carbon.apimgt.impl.workflow.UserSignUpSimpleWorkflowExecutor"> and uncomment <UserSignUp executor="org.wso2.carbon.apimgt.impl.workflow.UserSignUpWSWorkflowExecutor"> Also, update below property values based on your BPS server credintials, service endpoint.
- Now, go to API store and sign up to the store.
- When you signup to the API Store you will get a Notification. (User account awaiting Administrator Approval).
- Then, login to Admin Dashboard (https:<Server Host>:9443/admin).
- Go to Tasks > User Creation. Then you will able to see the pending user approval tasks like below.
- If you click on "Start" button, the tasks status changed into "In_Progress".
- Once, you click on "Complete" button, signed up user account become active and that user able to login to the API Store.
Set Offset value to 2 in <BPS_HOME>/repository/conf/carbon.xml.
<Offset>2</Offset>
Configuration on BPS is finished. Now, let's see how to configure WSO2 APIM.
<UserSignUp executor="org.wso2.carbon.apimgt.impl.workflow.UserSignUpWSWorkflowExecutor"> <Property name="serviceEndpoint">http://localhost:9765/services/UserSignupProcess/</Property> <Property name="username">admin</Property> <Property name="password">admin</Property> <Property name="callbackURL">https://localhost:8243/services/WorkflowCallbackService</Property> </UserSignUp>
Now Configuration in API Manager is finished.
Thanks for this tutorial.
ReplyDeleteSuppose I wanted to enable the user get email notification after approval, what do I need to do.
Thanks.