WSO2 Business Process Server has a complete management API to check which processes are deployed, running and completed instances, variables values and more. The available methods can be found at ProcessManagement, InstanceManagement and PackageManagement WSDLs.
Those three services can be invoked through any web service client.
NOTE: It is mandatory to authenticate the user before invoking management services.
The following is the source for sample management client which uses default username (admin), password (admin) to login to the BPS server and retrieves the process list. You can find the sample pom file to create a jar here
package org.wso2.bps.samples.client; import org.wso2.bps.samples.client.types.Login; import org.wso2.bps.samples.client.types.LoginResponse; import org.wso2.bps.samples.client.types.GetSystemPermissionOfUser; import org.wso2.bps.samples.client.types.GetSystemPermissionOfUserResponse; import org.wso2.bps.samples.client.mgt.types.ProcessInfoListPaginated; import org.wso2.bps.samples.client.mgt.types.ProcessInfoType; import org.wso2.bps.samples.client.mgt.ProcessManagementServiceStub; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; import org.apache.axis2.transport.http.HTTPConstants; import java.rmi.RemoteException; public class BPSManagementClient { final String backendServerURL = "https://localhost:9443/services/"; final String AUTHENTICATION_ADMIN_SERVICE = "AuthenticationAdminService"; final String trustStore = "/home/waruna/Desktop/BPS/new/wso2bps-1.1.0/repository/resources/security"; String userName = "admin"; String password = "admin"; String clientIPAddr = "localhost"; String cookie = null; public static void main (String []args) { boolean isLogged = false; BPSManagementClient client = new BPSManagementClient(); try { isLogged = client.authenticate(); } catch (AuthenticationExceptionException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (RemoteException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } ProcessInfoListPaginated processList = null; if (isLogged) { try { System.out.println("User: " + client.userName + " loggin successful"); processList = client.listProcessesPaginated("name}}* namespace=*", "deployed name", 0); } catch (RemoteException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } ProcessInfoType[] processes = processList.getProcessInfo(); if (processes != null) { System.out.println("---------------------------PROCESS LIST---------------------------"); System.out.println("\t\tNAME\t\t|\t\tSTATUS\t\t|\t\tVERSION\t\t|\t\tPACKAGE\t\t|\t\tDEPLOYED ON"); for (ProcessInfoType process : processes) { System.out.println(process.getPid() + "\t|\t" + process.getStatus().getValue() + "\t|\t" + process.getVersion() + "\t|\t" + process.getDeploymentInfo().getPackageName() + "\t|\t" + process.getDeploymentInfo().getDeployDate().getTime().toString()); } } else { System.out.println("NULL process list"); } } else { System.out.println("User: " + client.userName + " loggin FAILED!"); } } public boolean authenticate() throws AuthenticationExceptionException, RemoteException { String serviceURL = backendServerURL + AUTHENTICATION_ADMIN_SERVICE; AuthenticationAdminServiceStub stub = new AuthenticationAdminServiceStub(null, serviceURL); Login loginRequest = new Login(); loginRequest.setUsername(userName); loginRequest.setPassword(password); loginRequest.setRemoteAddress(clientIPAddr); System.setProperty("javax.net.ssl.trustStore", trustStore + "/client-truststore.jks"); System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon"); Options option = stub._getServiceClient().getOptions(); option.setManageSession(true); LoginResponse loginResponse = stub.login(loginRequest); boolean isLogged = loginResponse.get_return(); if (isLogged) { cookie = (String) stub._getServiceClient().getServiceContext().getProperty(HTTPConstants.COOKIE_STRING); } return isLogged; } public ProcessInfoListPaginated listProcessesPaginated(String filter, String orderBy, int pageNumber) throws RemoteException { String serviceURL = backendServerURL + "ProcessManagementService"; ProcessManagementServiceStub stub = new ProcessManagementServiceStub(null, serviceURL); ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); return stub.listProcessesPaginated(filter, orderBy, pageNumber); } }