Search in sources :

Example 6 with CmmnVariableOnPartDeclaration

use of org.camunda.bpm.engine.impl.cmmn.model.CmmnVariableOnPartDeclaration 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

CmmnVariableOnPartDeclaration (org.camunda.bpm.engine.impl.cmmn.model.CmmnVariableOnPartDeclaration)6 CmmnSentryDeclaration (org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration)5 ExtensionElements (org.camunda.bpm.model.cmmn.instance.ExtensionElements)4 CamundaVariableOnPart (org.camunda.bpm.model.cmmn.instance.camunda.CamundaVariableOnPart)4 Test (org.junit.Test)4 CmmnActivity (org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity)1 CmmnIfPartDeclaration (org.camunda.bpm.engine.impl.cmmn.model.CmmnIfPartDeclaration)1 CmmnOnPartDeclaration (org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration)1 VariableTransition (org.camunda.bpm.model.cmmn.VariableTransition)1 CamundaVariableTransitionEvent (org.camunda.bpm.model.cmmn.instance.camunda.CamundaVariableTransitionEvent)1