Search in sources :

Example 1 with InstanceSummaryE

use of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.InstanceSummaryE in project carbon-business-process by wso2.

the class InstanceManagementServiceSkeleton method getInstanceSummary.

public InstanceSummaryE getInstanceSummary() throws InstanceManagementException {
    InstanceSummaryE instanceSummary = new InstanceSummaryE();
    Integer tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
    TenantProcessStoreImpl tenantProcessStore = (TenantProcessStoreImpl) bpelServer.getMultiTenantProcessStore().getTenantsProcessStore(tenantId);
    instanceSummary.setActive(getInstanceCountByState(getTenantsProcessList(tenantProcessStore.getProcessConfigMap().keySet()), INSTANCE_STATUS_ACTIVE).intValue());
    instanceSummary.setCompleted(getInstanceCountByState(getTenantsProcessList(tenantProcessStore.getProcessConfigMap().keySet()), INSTANCE_STATUS_COMPLETED).intValue());
    instanceSummary.setFailed(getInstanceCountByState(getTenantsProcessList(tenantProcessStore.getProcessConfigMap().keySet()), INSTANCE_STATUS_FAILED).intValue());
    instanceSummary.setSuspended(getInstanceCountByState(getTenantsProcessList(tenantProcessStore.getProcessConfigMap().keySet()), INSTANCE_STATUS_SUSPENDED).intValue());
    instanceSummary.setTerminated(getInstanceCountByState(getTenantsProcessList(tenantProcessStore.getProcessConfigMap().keySet()), INSTANCE_STATUS_TERMINATED).intValue());
    return instanceSummary;
}
Also used : InstanceSummaryE(org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.InstanceSummaryE) TenantProcessStoreImpl(org.wso2.carbon.bpel.core.ode.integration.store.TenantProcessStoreImpl)

Aggregations

TenantProcessStoreImpl (org.wso2.carbon.bpel.core.ode.integration.store.TenantProcessStoreImpl)1 InstanceSummaryE (org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.InstanceSummaryE)1