Package org.drools.workbench.models.datamodel.rule

Examples of org.drools.workbench.models.datamodel.rule.RuleModel


                "  then\n" +
                "    application.setApr( application.getApr() + 5 );\n" +
                "    update( application )" +
                "end";

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        assertTrue( m.rhs[ 0 ] instanceof ActionUpdateField );
View Full Code Here


        addModelField( "Customer",
                       "contact",
                       "Contact",
                       "Contact" );

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        FactPattern pattern = (FactPattern) m.lhs[ 0 ];
        SingleFieldConstraint constraint = (SingleFieldConstraint) pattern.getFieldConstraints()[ 0 ];
View Full Code Here

        addModelField( "org.test.Customer",
                       "contact",
                       "org.test.Contact",
                       "org.test.Contact" );

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        FactPattern pattern = (FactPattern) m.lhs[ 0 ];
        SingleFieldConstraint constraint = (SingleFieldConstraint) pattern.getFieldConstraints()[ 0 ];
View Full Code Here

        addModelField( "org.test.Customer",
                       "contact",
                       "org.test.Contact",
                       "org.test.Contact" );

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        FactPattern pattern = (FactPattern) m.lhs[ 0 ];
        SingleFieldConstraint constraint = (SingleFieldConstraint) pattern.getFieldConstraints()[ 0 ];
View Full Code Here

        addModelField( "Contact",
                       "tel1",
                       "String",
                       "String" );

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        FactPattern pattern = (FactPattern) m.lhs[ 0 ];
        SingleFieldConstraint constraint = (SingleFieldConstraint) pattern.getFieldConstraints()[ 0 ];
View Full Code Here

        addModelField( "Applicant",
                       "age",
                       "java.lang.Integer",
                       "Integer" );

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        FactPattern pattern1 = (FactPattern) m.lhs[ 0 ];
        assertEquals( "a",
View Full Code Here

        addJavaEnumDefinition( "OuterClassWithEnums",
                               "outerField",
                               new String[]{ "TestEnum.VALUE1=TestEnum.VALUE1", "TestEnum.VALUE2=TestEnum.VALUE2" } );

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        FactPattern pattern = (FactPattern) m.lhs[ 0 ];
        assertEquals( 1,
View Full Code Here

        addJavaEnumDefinition( "org.drools.workbench.models.commons.backend.rule.OuterClassWithEnums",
                               "outerField",
                               new String[]{ "TestEnum.VALUE1=TestEnum.VALUE1", "TestEnum.VALUE2=TestEnum.VALUE2" } );

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        FactPattern pattern = (FactPattern) m.lhs[ 0 ];
        assertEquals( 1,
View Full Code Here

        addJavaEnumDefinition( "InnerClassWithEnums",
                               "innerField",
                               new String[]{ "TestEnum.VALUE1=TestEnum.VALUE1", "TestEnum.VALUE2=TestEnum.VALUE2" } );

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        FactPattern pattern = (FactPattern) m.lhs[ 0 ];
        assertEquals( 1,
View Full Code Here

        addJavaEnumDefinition( "org.drools.workbench.models.commons.backend.rule.OuterClassWithEnums$InnerClassWithEnums",
                               "innerField",
                               new String[]{ "TestEnum.VALUE1=TestEnum.VALUE1", "TestEnum.VALUE2=TestEnum.VALUE2" } );

        RuleModel m = RuleModelDRLPersistenceImpl.getInstance().unmarshal( drl,
                                                                           Collections.EMPTY_LIST,
                                                                           dmo );

        FactPattern pattern = (FactPattern) m.lhs[ 0 ];
        assertEquals( 1,
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.rule.RuleModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.