public void onCompletion(CmmnActivityExecution execution) { ensureTransitionAllowed(execution, ACTIVE, COMPLETED, "complete"); completing(execution); }
public void onStart(CmmnActivityExecution execution) { ensureNotCaseInstance(execution, "start"); ensureTransitionAllowed(execution, AVAILABLE, ACTIVE, "start"); }
protected void creating(CmmnActivityExecution execution) { evaluateRequiredRule(execution); }
public void onManualCompletion(CmmnActivityExecution execution) { ensureTransitionAllowed(execution, ACTIVE, COMPLETED, "complete"); manualCompleting(execution); }
public void onResume(CmmnActivityExecution execution) { ensureNotCaseInstance(execution, "resume"); ensureTransitionAllowed(execution, SUSPENDED, ACTIVE, "resume"); CmmnActivityExecution parent = execution.getParent(); if (parent != null) { if (!parent.isActive()) { String id = execution.getId(); throw LOG.resumeInactiveCaseException("resume", id); } } resuming(execution); }
public void created(CmmnActivityExecution execution) { if (execution.isAvailable() && isAtLeastOneEntryCriterionSatisfied(execution)) { fireEntryCriteria(execution); } }
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 onTermination(CmmnActivityExecution execution) { ensureTransitionAllowed(execution, ACTIVE, TERMINATED, "terminate"); performTerminate(execution); }
public void onSuspension(CmmnActivityExecution execution) { ensureTransitionAllowed(execution, ACTIVE, SUSPENDED, "suspend"); performSuspension(execution); }
public void onParentResume(CmmnActivityExecution execution) { ensureNotCaseInstance(execution, "parentResume"); String id = execution.getId(); if (!execution.isSuspended()) { throw LOG.wrongCaseStateException("parentResume", id, "resume", "suspended", execution.getCurrentState().toString()); } CmmnActivityExecution parent = execution.getParent(); if (parent != null) { if (!parent.isActive()) { throw LOG.resumeInactiveCaseException("parentResume", id); } } resuming(execution); }
protected void performExit(CmmnActivityExecution execution) { if (!isAbleToTerminate(execution)) { terminateChildren(execution); } else { super.performExit(execution); } }
public void onOccur(CmmnActivityExecution execution) { String id = execution.getId(); throw LOG.illegalStateTransitionException("occur", id, getTypeName()); }
public void fireEntryCriteria(CmmnActivityExecution execution) { boolean manualActivation = evaluateManualActivationRule(execution); if (manualActivation) { execution.enable(); } else { execution.start(); } }
protected boolean isAtLeastOneEntryCriterionSatisfied(CmmnActivityExecution execution) { if (!execution.isCaseInstanceExecution()) { return super.isAtLeastOneEntryCriterionSatisfied(execution); } return false; }
public void fireEntryCriteria(CmmnActivityExecution execution) { if (!execution.isCaseInstanceExecution()) { super.fireEntryCriteria(execution); return; } throw LOG.criteriaNotAllowedForCaseInstanceException("entry", execution.getId()); }
public void onResume(CmmnActivityExecution execution) { ensureNotCaseInstance(execution, "resume"); ensureTransitionAllowed(execution, SUSPENDED, ACTIVE, "resume"); CmmnActivityExecution parent = execution.getParent(); if (parent != null) { if (!parent.isActive()) { String id = execution.getId(); throw LOG.resumeInactiveCaseException("resume", id); } } resuming(execution); }
public void created(CmmnActivityExecution execution) { if (execution.isAvailable() && isAtLeastOneEntryCriterionSatisfied(execution)) { fireEntryCriteria(execution); } }
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 onManualCompletion(CmmnActivityExecution execution) { ensureTransitionAllowed(execution, ACTIVE, COMPLETED, "complete"); manualCompleting(execution); }
public void onTermination(CmmnActivityExecution execution) { ensureTransitionAllowed(execution, ACTIVE, TERMINATED, "terminate"); performTerminate(execution); }