0
votes

I'm trying to create custom workflow on Wso2 api manager. It's really easy and efficient. So now, I would add a custom subscription workflow and define which API or tiers should use it.

For example with different tiers:

  1. I'm a developer and I choose api A with tiers Bronze : when I subscribe to the API, the workflow 1 is execute.
  2. I'm an other developer and I choose api A with tiers Silver : when I subscribe to the API, the workflow 2 is execute.

I don't find documentation about it. Is it possible ? Should I code a general custom workflow and use a switch case ?

Thank a lot

1

1 Answers

0
votes

This can be possible with wso2 API Manager and BPS. When you are subscribe to an application it would execute the customized subscription flow. To do that you should extend the subscription flow by extending SubscriptionCreationWSWorkflowExecutor.java class. Override the complete() method. Create a jar file and add to the following path <APIM_HOME>/repository/components/lib. Start the apimanager server. Log in to APIM management console and select Browse under Resources . Go to /_system/governance/apimgt/applicationdata/workflow-extensions.xml resource, disable the Simple Workflow Executor and enable WS Workflow Executor. Then change the executor class to newly created class.

https://docs.wso2.com/display/AM190/Adding+an+API+Subscription+Workflow https://docs.wso2.com/display/AM191/Customizing+a+Workflow+Extension