Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

API Manager provides a task clean up feature to prevent deleted items from showing up in the Admin Dashboard. The WorkflowExecutor class has been is introduced with the 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 BPS that a task with ID the workflowExtRef is  ID has been deleted.

The BPEL process in Business Process Server should also have an understanding of how to exit a created process. Therefore BPEL process should contain an WSO2 BPS should contain a cancel event to support process cancellation. Each BPEL process should have the support for correlation and cancel event implemented, cancellation in order to successfully cleanup unnecessary tasks. Check BPEL Correlation Guide and Process Correlation for more information on BPEL Correlation.Final For more information on BPEL correlation, see Process Correlation and the BPEL Correlation Guide.

The final BPEL should have a design similar to the following diagram,

 

Image Removed

Lets take an example and check what happens (assumes

Image Added

Follow the steps below to test this out.

Info
This example assumes that workflows are enabled for application creation, application registration and subscription creation

...

.
  1. Create Log in to the API Store and create two new applications from the API Store.Approve .
  2. Log in to the Admin Dashboard Web application (https://<Server Host>:9443/admin-dashboard) and approve the creation of one application from the Admin Dashboard.
  3. Subscribe In the API Store, subscribe an API to the approved application using API Store.
  4. Generate production and/or sandbox key(s) for the approved application from API Store.

...

  1. Check the pending approval tasks

...

  1. in the Admin Dashboard. You see tasks pending for

...

  1. application creation,

...

  1. application registration and

...

  1. subscription creation.

...

  1. Delete the items you created from the API Store

...

  1. and notice that the respective administrator approval

...

  1. tasks are removed.
  2. If the application with pending subscription and key generation approvals is deleted from the API Store,

...

  1. all the pending subscription and key generation approval tasks are deleted for that application.

...