/** * Test whether a process state is one of the completed states, e.g., * {@link #STATE_COMPLETED_OK} or {@link #STATE_COMPLETED_WITH_FAULT}. * * @param state the state of the process * @return <code>true</code> if the process is finished. */ public static boolean isFinished(short state){ return !(canExecute(state) || state == STATE_SUSPENDED); } /**
boolean canReduce = true; assert _outstandingRequests == null && _imaManager != null; while (ProcessState.canExecute(_dao.getState()) && System.currentTimeMillis() < maxTime && canReduce) { canReduce = _vpu.execute(); if (ProcessState.canExecute(_dao.getState()) && canReduce) {
ProcessDAO process = _db.getProcessDAO(); ProcessInstanceDAO instance = process.getInstance(evt.getProcessInstanceId()); if(ProcessState.canExecute(instance.getState())){