Search in sources :

Example 6 with ProcessStoreImpl

use of org.wso2.carbon.bpel.core.ode.integration.store.ProcessStoreImpl in project carbon-business-process by wso2.

the class Processes method activateProcess.

public String activateProcess(String processQnameLocalPart) {
    int processCount = ((ProcessStoreImpl) processStore).getProcesses().size();
    QName name = null;
    if (processCount != 0) {
        for (int i = 0; i < processCount; i++) {
            if (processQnameLocalPart.equalsIgnoreCase(((ProcessStoreImpl) processStore).getProcesses().get(i).getLocalPart().toString())) {
                name = ((ProcessStoreImpl) processStore).getProcesses().get(i);
            }
        }
        if (name != null) {
            ((ProcessStoreImpl) processStore).setState(name, ProcessState.ACTIVE);
            return "successfully activated " + processQnameLocalPart;
        } else {
            return "no process with specified name";
        }
    } else {
        return "no processess deployed";
    }
}
Also used : ProcessStoreImpl(org.wso2.carbon.bpel.core.ode.integration.store.ProcessStoreImpl) QName(javax.xml.namespace.QName)

Aggregations

ProcessStoreImpl (org.wso2.carbon.bpel.core.ode.integration.store.ProcessStoreImpl)6 QName (javax.xml.namespace.QName)3 File (java.io.File)1 BPELServer (org.wso2.carbon.bpel.core.ode.integration.BPELServer)1 TenantProcessStore (org.wso2.carbon.bpel.core.ode.integration.store.TenantProcessStore)1 TenantProcessStoreImpl (org.wso2.carbon.bpel.core.ode.integration.store.TenantProcessStoreImpl)1