completeEntry(null, id, currentSteps);
completeEntry(null, id, currentSteps, newState);
    public void changeEntryState(long id, int newState) throws WorkflowException {        WorkflowStore store = getPersistence();        WorkflowEntry entry = store.findEntry(id);        if (entry.getState() == newState) {            return;        }        if (canModifyEntryState(id, newState)) {            if ((newState == WorkflowEntry.KILLED) || (newState == WorkflowEntry.COMPLETED)) {                Collection currentSteps = getCurrentSteps(id);                if (currentSteps.size() > 0) {                    completeEntry(null, id, currentSteps);                }            }            store.setEntryState(id, newState);        } else {            throw new InvalidEntryStateException("Can't transition workflow instance #" + id + ". Current state is " + entry.getState() + ", requested state is " + newState);        }        if (log.isDebugEnabled()) {            log.debug(entry.getId() + " : State is now : " + entry.getState());        }    }