Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Once the workflow extensions are enabled using default workflow executors, they create respective approval tasks in WSO2 Business Process Server. Each of these tasks are visible for Administrators in Admin Dashboard. Administrator has the option to accept or reject each of the requests made by other users. But users have the option to delete the application, subscription or key they created before administrator choose to accept or reject the requests. This leaves unnecessary approval requests in Admin Dashboard which can confuse the administrator.

API Manager provides task clean up feature to prevent deleted items showing up in Admin Dashboard. WorkflowExecutor class has been introduced with cleanUpPendingTask(String workflowExtRef) method which is triggered by application or subscription deletion. This method implements the logic to notify the WSO2 Business Process Server that a task with ID workflowExtRef is deleted. BPEL process in Business Process Server should also have an understanding of how to exit a created process. Therefore BPEL process should contain an cancel event to support process cancellation. Each BPEL should have the support for correlation and cancel event implemented, in order to successfully cleanup unnecessary tasks. Check BPEL Correlation Guide and Process Correlation for more information on BPEL Correlation.

Final BPEL should have a design similar to following diagram,

 

Lets take an example and check what happens (assumes workflows are enabled for application creation, application registration and subscription creation).

  1. Create two new applications from the API Store.
  2. Approve creation of one application from the Admin Dashboard.
  3. Subscribe an API to approved application using API Store.
  4. Generate production and/or sandbox key(s) for approved application from API Store.

Now check Admin Dashboard to see what are the pending approval tasks. There will be tasks pending for Application creation, Application registration and Subscription creation.

Deleting the items you created from the API Store in this state, will remove respective administrator approval task visible from the Admin Dashboard.

If the application with pending subscription and key generation approvals is deleted from the API Store, it'll remove all the pending subscription and key generation approval tasks for that application.

 

  • No labels