protected internal virtual void checkAndCompleteCaseExecution(CmmnActivityExecution execution) { if (canComplete(execution)) { execution.complete(); } }
// start ///////////////////////////////////////////////////////////////////// protected internal override void performStart(CmmnActivityExecution execution) { CmmnActivity activity = execution.Activity; IList <CmmnActivity> childActivities = activity.Activities; if (childActivities != null && childActivities.Count > 0) { IList <CmmnExecution> children = execution.createChildExecutions(childActivities); execution.createSentryParts(); execution.triggerChildExecutionsLifecycle(children); if (execution.Active) { execution.fireIfOnlySentryParts(); // if "autoComplete == true" and there are no // required nor active child activities, // then the stage will be completed. if (execution.Active) { checkAndCompleteCaseExecution(execution); } } } else { execution.complete(); } }
protected internal override void performStart(CmmnActivityExecution execution) { VariableMap variables = getInputVariables(execution); string businessKey = getBusinessKey(execution); triggerCallableElement(execution, variables, businessKey); if (execution.Active && !isBlocking(execution)) { execution.complete(); } }
protected internal override void performStart(CmmnActivityExecution execution) { try { evaluateDecision((AbstractVariableScope)execution, callableElement, resultVariable, decisionResultMapper); if (execution.Active) { execution.complete(); } } catch (Exception e) { throw e; } catch (Exception e) { throw LOG.decisionDefinitionEvaluationFailed(execution, e); } }
protected internal override void eventNotificationsCompleted(PvmExecutionImpl execution) { execution.leaveActivityInstance(); PvmExecutionImpl superExecution = execution.SuperExecution; CmmnActivityExecution superCaseExecution = execution.SuperCaseExecution; SubProcessActivityBehavior subProcessActivityBehavior = null; TransferVariablesActivityBehavior transferVariablesBehavior = null; // copy variables before destroying the ended sub process instance if (superExecution != null) { PvmActivity activity = superExecution.getActivity(); subProcessActivityBehavior = (SubProcessActivityBehavior)activity.ActivityBehavior; try { subProcessActivityBehavior.passOutputVariables(superExecution, execution); } catch (Exception e) { LOG.exceptionWhileCompletingSupProcess(execution, e); throw e; } catch (Exception e) { LOG.exceptionWhileCompletingSupProcess(execution, e); throw new ProcessEngineException("Error while completing sub process of execution " + execution, e); } } else if (superCaseExecution != null) { CmmnActivity activity = superCaseExecution.Activity; transferVariablesBehavior = (TransferVariablesActivityBehavior)activity.ActivityBehavior; try { transferVariablesBehavior.transferVariables(execution, superCaseExecution); } catch (Exception e) { LOG.exceptionWhileCompletingSupProcess(execution, e); throw e; } catch (Exception e) { LOG.exceptionWhileCompletingSupProcess(execution, e); throw new ProcessEngineException("Error while completing sub process of execution " + execution, e); } } execution.destroy(); execution.remove(); // and trigger execution afterwards if (superExecution != null) { superExecution.SubProcessInstance = null; try { subProcessActivityBehavior.completed(superExecution); } catch (Exception e) { LOG.exceptionWhileCompletingSupProcess(execution, e); throw e; } catch (Exception e) { LOG.exceptionWhileCompletingSupProcess(execution, e); throw new ProcessEngineException("Error while completing sub process of execution " + execution, e); } } else if (superCaseExecution != null) { superCaseExecution.complete(); } }