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";
}
}
Aggregations