All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kie.dmn.validation.DMNv1x.Rules8D6A06B2CA38F0645C450A91AA760788RuleMethods3 Maven / Gradle / Ivy

The newest version!
package org.kie.dmn.validation.DMNv1x;

import org.drools.modelcompiler.dsl.pattern.D;
import org.drools.model.Index.ConstraintType;
import org.kie.dmn.model.api.*;
import org.kie.dmn.core.util.MsgUtil;
import org.kie.dmn.api.core.DMNMessage;
import org.kie.dmn.core.impl.DMNMessageImpl;
import org.kie.dmn.api.feel.runtime.events.FEELEvent;
import org.kie.dmn.feel.lang.types.BuiltInType;
import org.kie.dmn.feel.parser.feel11.FEELParser;
import org.kie.dmn.core.compiler.ImportDMNResolverUtil;
import org.kie.dmn.feel.runtime.events.SyntaxErrorEvent;
import org.kie.dmn.core.util.Msg;
import org.kie.dmn.validation.ValidatorUtil;
import static org.kie.dmn.validation.ValidatorUtil.getRootItemDef;
import static org.kie.dmn.validation.ValidatorUtil.rightOfHash;
import static org.kie.dmn.validation.ValidatorUtil.nameOrIDOfTable;
import static org.kie.dmn.validation.ValidatorUtil.leftOfHash;
import static org.kie.dmn.validation.DMNv1x.Rules8D6A06B2CA38F0645C450A91AA760788.*;
import static org.kie.dmn.validation.DMNv1x.Rules8D6A06B2CA38F0645C450A91AA760788.*;

public class Rules8D6A06B2CA38F0645C450A91AA760788RuleMethods3 {

    /**
     * Rule name: DECISION_DECISION_OWNER_WRONG_TYPE
     */
    public static org.drools.model.Rule rule_DECISION__DECISION__OWNER__WRONG__TYPE() {
        final org.drools.model.Variable var_$d = D.declarationOf(org.kie.dmn.model.api.Decision.class,
                                                                                                 DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_Decision_Metadata_INSTANCE,
                                                                                                 "$d");
        final org.drools.model.Variable var_$elemRef = D.declarationOf(org.kie.dmn.model.api.DMNElementReference.class,
                                                                                                                  DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_DMNElementReference_Metadata_INSTANCE,
                                                                                                                  "$elemRef",
                                                                                                                  D.reactiveFrom(var_$d,
                                                                                                                                 org.kie.dmn.validation.DMNv1x.P29.LambdaExtractor292BBD8B34B21BAD8FC6321CAD26ECB5.INSTANCE));
        final org.drools.model.Variable var_$element = D.declarationOf(org.kie.dmn.model.api.DMNElement.class,
                                                                                                         DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_DMNElement_Metadata_INSTANCE,
                                                                                                         "$element");
        org.drools.model.Rule rule = D.rule("org.kie.dmn.validation.DMNv1x",
                                            "DECISION_DECISION_OWNER_WRONG_TYPE")
                                      .build(D.pattern(var_$d),
                                             D.pattern(var_$elemRef),
                                             D.pattern(var_$element).expr("GENERATED_D0E504FF35A21EB89B9DA2334A730A81",
                                                                          var_$elemRef,
                                                                          org.kie.dmn.validation.DMNv1x.P00.LambdaPredicate0056DAD7E5BDE34957F993B3A7DCBB15.INSTANCE,
                                                                          D.reactOn("id")).expr("GENERATED_9185BF162BD655C2F71CAD82D25C25B3",
                                                                                                org.kie.dmn.validation.DMNv1x.P74.LambdaPredicate74ACE96D2A366EEE83CC35D0F8634BE7.INSTANCE),
                                             D.on(var_$d,
                                                  var_$element,
                                                  var_reporter,
                                                  var_$elemRef).execute(org.kie.dmn.validation.DMNv1x.P96.LambdaConsequence969DD4FC3794FBD6D1F15EA0AC6392EE.INSTANCE));
        return rule;
    }

    /**
     * Rule name: KNOW_SOURCE_OWNER_NOT_ORG_UNIT
     */
    public static org.drools.model.Rule rule_KNOW__SOURCE__OWNER__NOT__ORG__UNIT() {
        final org.drools.model.Variable var_$knowSource = D.declarationOf(org.kie.dmn.model.api.KnowledgeSource.class,
                                                                                                                 DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_KnowledgeSource_Metadata_INSTANCE,
                                                                                                                 "$knowSource");
        final org.drools.model.Variable var_$elemRef = D.declarationOf(org.kie.dmn.model.api.DMNElementReference.class,
                                                                                                                  DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_DMNElementReference_Metadata_INSTANCE,
                                                                                                                  "$elemRef");
        final org.drools.model.Variable var_$targetId = D.declarationOf(java.lang.String.class,
                                                                                          DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.java_lang_String_Metadata_INSTANCE,
                                                                                          "$targetId");
        final org.drools.model.Variable var_GENERATED_$pattern_DMNElement$47$ = D.declarationOf(org.kie.dmn.model.api.DMNElement.class,
                                                                                                                                  DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_DMNElement_Metadata_INSTANCE,
                                                                                                                                  "GENERATED_$pattern_DMNElement$47$");
        org.drools.model.Rule rule = D.rule("org.kie.dmn.validation.DMNv1x",
                                            "KNOW_SOURCE_OWNER_NOT_ORG_UNIT")
                                      .build(D.pattern(var_$knowSource).expr("GENERATED_D355D16718E9DA16BAA58DD8F92CC61F",
                                                                             org.kie.dmn.validation.DMNv1x.P69.LambdaPredicate69E0272737BF02730BCEE49CA6C4955F.INSTANCE,
                                                                             D.reactOn("owner")).bind(var_$elemRef,
                                                                                                      org.kie.dmn.validation.DMNv1x.PC9.LambdaExtractorC9BD26EA52126B6F7E3F27E19685EF02.INSTANCE,
                                                                                                      D.reactOn("owner")).bind(var_$targetId,
                                                                                                                               org.kie.dmn.validation.DMNv1x.PBD.LambdaExtractorBDC90C267EABC2B3FBC26AF9197E292E.INSTANCE,
                                                                                                                               D.reactOn("owner")),
                                             D.pattern(var_GENERATED_$pattern_DMNElement$47$).expr("GENERATED_4DAA314EC7EBD693DBA3EE6C517242E3",
                                                                                                   var_$targetId,
                                                                                                   org.kie.dmn.validation.DMNv1x.PD5.LambdaPredicateD5DD9AF48DBD6535EA46CB0A35D674B0.INSTANCE,
                                                                                                   D.betaIndexedBy(java.lang.String.class,
                                                                                                                   org.drools.model.Index.ConstraintType.EQUAL,
                                                                                                                   DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_DMNElement_Metadata_INSTANCE.getPropertyIndex("id"),
                                                                                                                   org.kie.dmn.validation.DMNv1x.P0D.LambdaExtractor0D8063A04C207B794607BACF62A1CE5A.INSTANCE,
                                                                                                                   org.kie.dmn.validation.DMNv1x.PBE.LambdaExtractorBE160130D220211540DC9494CAF7F196.INSTANCE,
                                                                                                                   java.lang.String.class),
                                                                                                   D.reactOn("id")).expr("GENERATED_9185BF162BD655C2F71CAD82D25C25B3",
                                                                                                                         org.kie.dmn.validation.DMNv1x.P74.LambdaPredicate74ACE96D2A366EEE83CC35D0F8634BE7.INSTANCE),
                                             D.on(var_$targetId,
                                                  var_reporter,
                                                  var_$knowSource,
                                                  var_$elemRef).execute(org.kie.dmn.validation.DMNv1x.P2A.LambdaConsequence2A2D9FA97957F7347FA06824B062B59E.INSTANCE));
        return rule;
    }

    /**
     * Rule name: CONTEXT_DUP_ENTRY
     */
    public static org.drools.model.Rule rule_CONTEXT__DUP__ENTRY() {
        final org.drools.model.Variable var_$ce1 = D.declarationOf(org.kie.dmn.model.api.ContextEntry.class,
                                                                                                       DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_ContextEntry_Metadata_INSTANCE,
                                                                                                       "$ce1");
        final org.drools.model.Variable var_$ce2 = D.declarationOf(org.kie.dmn.model.api.ContextEntry.class,
                                                                                                       DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_ContextEntry_Metadata_INSTANCE,
                                                                                                       "$ce2");
        org.drools.model.Rule rule = D.rule("org.kie.dmn.validation.DMNv1x",
                                            "CONTEXT_DUP_ENTRY")
                                      .build(D.pattern(var_$ce1).expr("GENERATED_D0E52F28EC0770654DF723D441AA60C9",
                                                                      org.kie.dmn.validation.DMNv1x.P2D.LambdaPredicate2D5391A7D9AF88411606C047F710B2AE.INSTANCE,
                                                                      D.reactOn("parent")).expr("GENERATED_6AC63E84DEDB93C773EAFC3835951600",
                                                                                                org.kie.dmn.validation.DMNv1x.P2B.LambdaPredicate2B55633A344FD79554A465DDF15831D0.INSTANCE,
                                                                                                D.reactOn("variable")).watch("parent",
                                                                                                                             "variable"),
                                             D.pattern(var_$ce2).expr("GENERATED_6AC63E84DEDB93C773EAFC3835951600",
                                                                      org.kie.dmn.validation.DMNv1x.P2B.LambdaPredicate2B55633A344FD79554A465DDF15831D0.INSTANCE,
                                                                      D.reactOn("variable")).expr("GENERATED_341228369BFA9203756734E69E2BBA0B",
                                                                                                  var_$ce1,
                                                                                                  org.kie.dmn.validation.DMNv1x.PE6.LambdaPredicateE6244F8BDC8F9A81850FC9EEFD80F7CB.INSTANCE).expr("GENERATED_C3E6572E93D7427E05BC5B2214120E35",
                                                                                                                                                                                                   var_$ce1,
                                                                                                                                                                                                   org.kie.dmn.validation.DMNv1x.P73.LambdaPredicate733545120082DD72074DE129C951594B.INSTANCE,
                                                                                                                                                                                                   D.reactOn("variable")).expr("GENERATED_CD10FA27EDCDDC454B96D3E451E905FB",
                                                                                                                                                                                                                               var_$ce1,
                                                                                                                                                                                                                               org.kie.dmn.validation.DMNv1x.PE2.LambdaPredicateE2807DC5860011F25643802825C511BD.INSTANCE,
                                                                                                                                                                                                                               D.betaIndexedBy(org.kie.dmn.model.api.DMNModelInstrumentedBase.class,
                                                                                                                                                                                                                                               org.drools.model.Index.ConstraintType.EQUAL,
                                                                                                                                                                                                                                               DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_ContextEntry_Metadata_INSTANCE.getPropertyIndex("parent"),
                                                                                                                                                                                                                                               org.kie.dmn.validation.DMNv1x.P69.LambdaExtractor69FE829BE12C17C4F162EE584EA211DF.INSTANCE,
                                                                                                                                                                                                                                               org.kie.dmn.validation.DMNv1x.P2E.LambdaExtractor2E35F067CA2837FD25CCF106B9FF3E37.INSTANCE,
                                                                                                                                                                                                                                               org.kie.dmn.model.api.DMNModelInstrumentedBase.class),
                                                                                                                                                                                                                               D.reactOn("parent")).expr("GENERATED_0C7E66D3173B2F9C74F39AA4170A4ECD",
                                                                                                                                                                                                                                                         var_$ce1,
                                                                                                                                                                                                                                                         org.kie.dmn.validation.DMNv1x.P4D.LambdaPredicate4D42FCB2B0CD717732189052A95DA452.INSTANCE,
                                                                                                                                                                                                                                                         D.betaIndexedBy(org.kie.dmn.model.api.ContextEntry.class,
                                                                                                                                                                                                                                                                         org.drools.model.Index.ConstraintType.NOT_EQUAL,
                                                                                                                                                                                                                                                                         DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_ContextEntry_Metadata_INSTANCE.getPropertyIndex("this"),
                                                                                                                                                                                                                                                                         org.kie.dmn.validation.DMNv1x.PEE.LambdaExtractorEEEE58CBBBEDBBC8EDD59C8F6380F3C2.INSTANCE,
                                                                                                                                                                                                                                                                         org.kie.dmn.validation.DMNv1x.P59.LambdaExtractor59B223428C5FA945E0550DCF19FFEA20.INSTANCE,
                                                                                                                                                                                                                                                                         org.kie.dmn.model.api.ContextEntry.class)),
                                             D.on(var_reporter,
                                                  var_$ce1).execute(org.kie.dmn.validation.DMNv1x.P99.LambdaConsequence99CE6513AD2EC77AE0D5EB29774981E9.INSTANCE));
        return rule;
    }

    /**
     * Rule name: CONTEXT_MISSING_ENTRIES
     */
    public static org.drools.model.Rule rule_CONTEXT__MISSING__ENTRIES() {
        final org.drools.model.Variable var_$c = D.declarationOf(org.kie.dmn.model.api.Context.class,
                                                                                                DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_Context_Metadata_INSTANCE,
                                                                                                "$c");
        org.drools.model.Rule rule = D.rule("org.kie.dmn.validation.DMNv1x",
                                            "CONTEXT_MISSING_ENTRIES")
                                      .build(D.pattern(var_$c).expr("GENERATED_AAA086A9CC21CECB043A65CAA528F50D",
                                                                    org.kie.dmn.validation.DMNv1x.PCB.LambdaPredicateCB2EC6CE312FC460E72204633050183C.INSTANCE,
                                                                    D.reactOn("contextEntry")),
                                             D.on(var_reporter,
                                                  var_$c).execute(org.kie.dmn.validation.DMNv1x.PCF.LambdaConsequenceCF7A49CBF30B2D198618D3C459612C30.INSTANCE));
        return rule;
    }

    /**
     * Rule name: CONTEXT_MISSING_VARIABLE
     */
    public static org.drools.model.Rule rule_CONTEXT__MISSING__VARIABLE() {
        final org.drools.model.Variable var_$c = D.declarationOf(org.kie.dmn.model.api.Context.class,
                                                                                                DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_Context_Metadata_INSTANCE,
                                                                                                "$c");
        final org.drools.model.Variable var_$ce = D.declarationOf(org.kie.dmn.model.api.ContextEntry.class,
                                                                                                      DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_ContextEntry_Metadata_INSTANCE,
                                                                                                      "$ce");
        org.drools.model.Rule rule = D.rule("org.kie.dmn.validation.DMNv1x",
                                            "CONTEXT_MISSING_VARIABLE")
                                      .build(D.pattern(var_$c).expr("GENERATED_AFEE77F907CB07DDF71B122873C114D1",
                                                                    org.kie.dmn.validation.DMNv1x.P21.LambdaPredicate2149F0A1F5F38AABE2F191208093165D.INSTANCE,
                                                                    D.reactOn("contextEntry")).watch("contextEntry"),
                                             D.pattern(var_$ce).expr("GENERATED_01B950EDBB268330CC6B558437DE18AF",
                                                                     org.kie.dmn.validation.DMNv1x.PB7.LambdaPredicateB742172A5348E8F20E15059DE86AD6DB.INSTANCE,
                                                                     D.reactOn("variable")).expr("GENERATED_C9E3B1C9FCCC9B6DB7D82902AC1AE5D6",
                                                                                                 var_$c,
                                                                                                 org.kie.dmn.validation.DMNv1x.P3B.LambdaPredicate3B28B513CC53F039471240461E26E1A5.INSTANCE,
                                                                                                 D.betaIndexedBy(org.kie.dmn.model.api.DMNModelInstrumentedBase.class,
                                                                                                                 org.drools.model.Index.ConstraintType.EQUAL,
                                                                                                                 DomainClassesMetadata8D6A06B2CA38F0645C450A91AA760788.org_kie_dmn_model_api_ContextEntry_Metadata_INSTANCE.getPropertyIndex("parent"),
                                                                                                                 org.kie.dmn.validation.DMNv1x.P69.LambdaExtractor69FE829BE12C17C4F162EE584EA211DF.INSTANCE,
                                                                                                                 org.kie.dmn.validation.DMNv1x.P07.LambdaExtractor0781A4C4E67FC1865DD7B26A19F05DDE.INSTANCE,
                                                                                                                 org.kie.dmn.model.api.Context.class),
                                                                                                 D.reactOn("parent")).expr("GENERATED_1D301F1CC4262B39283810A597612081",
                                                                                                                           var_$c,
                                                                                                                           org.kie.dmn.validation.DMNv1x.P80.LambdaPredicate80A1C6D9B69339D2100944428634F504.INSTANCE),
                                             D.on(var_$ce,
                                                  var_reporter,
                                                  var_$c).execute(org.kie.dmn.validation.DMNv1x.P34.LambdaConsequence3458FACC1A8ECB60DADE7D1BC986F051.INSTANCE));
        return rule;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy