public CaseIllegalStateTransitionException alreadyTerminatedException(String transition, String id) { return alreadyStateCaseException(transition, id, "terminated"); }
public CaseIllegalStateTransitionException criteriaNotAllowedForEventListenerException(String criteria, String id) { return criteriaNotAllowedException(criteria, id, "event listener"); }
public void fireEntryCriteria(CmmnActivityExecution execution) { throw LOG.criteriaNotAllowedForEventListenerException("entry", execution.getId()); }
public void onClose(CmmnActivityExecution execution) { String id = execution.getId(); if (execution.isCaseInstanceExecution()) { if (execution.isClosed()) { throw LOG.alreadyClosedCaseException("close", id); } if (execution.isActive()) { throw LOG.wrongCaseStateException("close", id, "[completed|terminated|suspended]", "active"); } } else { throw LOG.notACaseInstanceException("close", id); } }
public void onParentSuspension(CmmnActivityExecution execution) { ensureNotCaseInstance(execution, "parentSuspension"); String id = execution.getId(); if (execution.isSuspended()) { throw LOG.alreadySuspendedException("parentSuspend", id); } if (execution.isCompleted() || execution.isTerminated()) { throw LOG.wrongCaseStateException("parentSuspend", id, "suspend", "[available|enabled|disabled|active]", execution.getCurrentState().toString()); } performParentSuspension(execution); }
public void onExit(CmmnActivityExecution execution) { String id = execution.getId(); if (execution.isTerminated()) { throw LOG.alreadyTerminatedException("exit", id); } if (execution.isCompleted()) { throw LOG.wrongCaseStateException("exit", id, "[available|enabled|disabled|active|failed|suspended]", "completed"); } performExit(execution); }
public void onReactivation(CmmnActivityExecution execution) { String id = execution.getId(); if (execution.isActive()) { throw LOG.alreadyActiveException("reactivate", id); } if (execution.isCaseInstanceExecution()) { if (execution.isClosed()) { throw LOG.alreadyClosedCaseException("reactivate", id); } } else { ensureTransitionAllowed(execution, FAILED, ACTIVE, "reactivate"); } }
public void fireEntryCriteria(CmmnActivityExecution execution) { if (!execution.isCaseInstanceExecution()) { super.fireEntryCriteria(execution); return; } throw LOG.criteriaNotAllowedForCaseInstanceException("entry", execution.getId()); }
@Override protected void performStart(CmmnActivityExecution execution) { try { evaluateDecision((AbstractVariableScope) execution, callableElement, resultVariable, decisionResultMapper); if (execution.isActive()) { execution.complete(); } } catch (RuntimeException e) { throw e; } catch (Exception e) { throw LOG.decisionDefinitionEvaluationFailed(execution, e); } }
public void fireExitCriteria(CmmnActivityExecution execution) { throw LOG.criteriaNotAllowedForEventListenerOrMilestonesException("exit", execution.getId()); }
public void onClose(CmmnActivityExecution execution) { String id = execution.getId(); if (execution.isCaseInstanceExecution()) { if (execution.isClosed()) { throw LOG.alreadyClosedCaseException("close", id); } if (execution.isActive()) { throw LOG.wrongCaseStateException("close", id, "[completed|terminated|suspended]", "active"); } } else { throw LOG.notACaseInstanceException("close", id); } }
public void onParentSuspension(CmmnActivityExecution execution) { ensureNotCaseInstance(execution, "parentSuspension"); String id = execution.getId(); if (execution.isSuspended()) { throw LOG.alreadySuspendedException("parentSuspend", id); } if (execution.isCompleted() || execution.isTerminated()) { throw LOG.wrongCaseStateException("parentSuspend", id, "suspend", "[available|enabled|disabled|active]", execution.getCurrentState().toString()); } performParentSuspension(execution); }
public void onExit(CmmnActivityExecution execution) { String id = execution.getId(); if (execution.isTerminated()) { throw LOG.alreadyTerminatedException("exit", id); } if (execution.isCompleted()) { throw LOG.wrongCaseStateException("exit", id, "[available|enabled|disabled|active|failed|suspended]", "completed"); } performExit(execution); }
public void onReactivation(CmmnActivityExecution execution) { String id = execution.getId(); if (execution.isActive()) { throw LOG.alreadyActiveException("reactivate", id); } if (execution.isCaseInstanceExecution()) { if (execution.isClosed()) { throw LOG.alreadyClosedCaseException("reactivate", id); } } else { ensureTransitionAllowed(execution, FAILED, ACTIVE, "reactivate"); } }
public void fireEntryCriteria(CmmnActivityExecution execution) { if (!execution.isCaseInstanceExecution()) { super.fireEntryCriteria(execution); return; } throw LOG.criteriaNotAllowedForCaseInstanceException("entry", execution.getId()); }
@Override protected void performStart(CmmnActivityExecution execution) { try { evaluateDecision((AbstractVariableScope) execution, callableElement, resultVariable, decisionResultMapper); if (execution.isActive()) { execution.complete(); } } catch (RuntimeException e) { throw e; } catch (Exception e) { throw LOG.decisionDefinitionEvaluationFailed(execution, e); } }
public void fireExitCriteria(CmmnActivityExecution execution) { throw LOG.criteriaNotAllowedForEventListenerOrMilestonesException("exit", execution.getId()); }
public void onClose(CmmnActivityExecution execution) { String id = execution.getId(); if (execution.isCaseInstanceExecution()) { if (execution.isClosed()) { throw LOG.alreadyClosedCaseException("close", id); } if (execution.isActive()) { throw LOG.wrongCaseStateException("close", id, "[completed|terminated|suspended]", "active"); } } else { throw LOG.notACaseInstanceException("close", id); } }
public void onParentSuspension(CmmnActivityExecution execution) { ensureNotCaseInstance(execution, "parentSuspension"); String id = execution.getId(); if (execution.isSuspended()) { throw LOG.alreadySuspendedException("parentSuspend", id); } if (execution.isCompleted() || execution.isTerminated()) { throw LOG.wrongCaseStateException("parentSuspend", id, "suspend", "[available|enabled|disabled|active]", execution.getCurrentState().toString()); } performParentSuspension(execution); }
public void onExit(CmmnActivityExecution execution) { String id = execution.getId(); if (execution.isTerminated()) { throw LOG.alreadyTerminatedException("exit", id); } if (execution.isCompleted()) { throw LOG.wrongCaseStateException("exit", id, "[available|enabled|disabled|active|failed|suspended]", "completed"); } performExit(execution); }