Search in sources :

Example 56 with CmmnSentryDeclaration

use of org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration in project camunda-bpm-platform by camunda.

the class CmmnExecution method createSentryParts.

public void createSentryParts() {
    CmmnActivity activity = getActivity();
    ensureNotNull("Case execution '" + id + "': has no current activity", "activity", activity);
    List<CmmnSentryDeclaration> sentries = activity.getSentries();
    if (sentries != null && !sentries.isEmpty()) {
        for (CmmnSentryDeclaration sentryDeclaration : sentries) {
            CmmnIfPartDeclaration ifPartDeclaration = sentryDeclaration.getIfPart();
            if (ifPartDeclaration != null) {
                CmmnSentryPart ifPart = createIfPart(sentryDeclaration, ifPartDeclaration);
                addSentryPart(ifPart);
            }
            List<CmmnOnPartDeclaration> onPartDeclarations = sentryDeclaration.getOnParts();
            for (CmmnOnPartDeclaration onPartDeclaration : onPartDeclarations) {
                CmmnSentryPart onPart = createOnPart(sentryDeclaration, onPartDeclaration);
                addSentryPart(onPart);
            }
            List<CmmnVariableOnPartDeclaration> variableOnPartDeclarations = sentryDeclaration.getVariableOnParts();
            for (CmmnVariableOnPartDeclaration variableOnPartDeclaration : variableOnPartDeclarations) {
                CmmnSentryPart variableOnPart = createVariableOnPart(sentryDeclaration, variableOnPartDeclaration);
                addSentryPart(variableOnPart);
            }
        }
    }
}
Also used : CmmnIfPartDeclaration(org.camunda.bpm.engine.impl.cmmn.model.CmmnIfPartDeclaration) CmmnSentryDeclaration(org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration) CmmnVariableOnPartDeclaration(org.camunda.bpm.engine.impl.cmmn.model.CmmnVariableOnPartDeclaration) CmmnOnPartDeclaration(org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration) CmmnActivity(org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity)

Aggregations

CmmnSentryDeclaration (org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration)56 CmmnActivity (org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity)47 Test (org.junit.Test)45 Sentry (org.camunda.bpm.model.cmmn.instance.Sentry)41 IfPart (org.camunda.bpm.model.cmmn.instance.IfPart)39 ConditionExpression (org.camunda.bpm.model.cmmn.instance.ConditionExpression)38 SentryHandler (org.camunda.bpm.engine.impl.cmmn.handler.SentryHandler)36 CasePlanModelHandler (org.camunda.bpm.engine.impl.cmmn.handler.CasePlanModelHandler)35 Body (org.camunda.bpm.model.cmmn.instance.Body)25 EntryCriterion (org.camunda.bpm.model.cmmn.instance.EntryCriterion)21 ExitCriterion (org.camunda.bpm.model.cmmn.instance.ExitCriterion)21 CmmnOnPartDeclaration (org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration)5 CmmnVariableOnPartDeclaration (org.camunda.bpm.engine.impl.cmmn.model.CmmnVariableOnPartDeclaration)5 CamundaVariableOnPart (org.camunda.bpm.model.cmmn.instance.camunda.CamundaVariableOnPart)5 CmmnIfPartDeclaration (org.camunda.bpm.engine.impl.cmmn.model.CmmnIfPartDeclaration)4 ExtensionElements (org.camunda.bpm.model.cmmn.instance.ExtensionElements)4 Expression (org.camunda.bpm.engine.delegate.Expression)3 CamundaString (org.camunda.bpm.model.cmmn.instance.camunda.CamundaString)2 MilestoneActivityBehavior (org.camunda.bpm.engine.impl.cmmn.behavior.MilestoneActivityBehavior)1 CaseExecutionImpl (org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl)1