break;  case WorkflowEntry.SUSPENDED:  if (currentState == WorkflowEntry.ACTIVATED) { result = true; }  break;  case WorkflowEntry.KILLED:  if ((currentState == WorkflowEntry.CREATED) || (currentState == WorkflowEntry.ACTIVATED) || (currentState == WorkflowEntry.SUSPENDED)) { result = true; }  break;  default: result = false;  break;
return result; } catch (StoreException e) { log.error("Error checking state modifiable for instance #" + id, e);
    public boolean canModifyEntryState(long id, int newState) throws WorkflowException {        WorkflowStore store = getPersistence();        WorkflowEntry entry = store.findEntry(id);        int currentState = entry.getState();        boolean result = false;        switch (newState) {        case WorkflowEntry.CREATED:            result = false;        case WorkflowEntry.ACTIVATED:            if ((currentState == WorkflowEntry.CREATED) || (currentState == WorkflowEntry.SUSPENDED)) {                result = true;            }            break;        case WorkflowEntry.SUSPENDED:            if (currentState == WorkflowEntry.ACTIVATED) {                result = true;            }            break;        case WorkflowEntry.KILLED:            if ((currentState == WorkflowEntry.CREATED) || (currentState == WorkflowEntry.ACTIVATED) || (currentState == WorkflowEntry.SUSPENDED)) {                result = true;            }            break;        default:            result = false;            break;        }        return result;    }