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

Examples of org.drools.workbench.models.datamodel.rule.CompositeFactPattern.addFactPattern()


        cfp_sfp1.setOperator( "==" );
        cfp_sfp1.setValue( "42" );
        cfp_sfp1.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cfp_sfp1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        fp1.addConstraint( cfp_sfp1 );
        cfp.addFactPattern( fp1 );

        FactPattern fp2 = new FactPattern();
        fp2.setFactType( "Person" );

        SingleFieldConstraint cfp_sfp2 = new SingleFieldConstraint();
View Full Code Here


        cfp_sfp2.setOperator( "==" );
        cfp_sfp2.setValue( "43" );
        cfp_sfp2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cfp_sfp2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        fp2.addConstraint( cfp_sfp2 );
        cfp.addFactPattern( fp2 );

        m.addLhsItem( cfp );

        String actualDrl = RuleModelDRLPersistenceImpl.getInstance().marshal( m );
        assertEqualsIgnoreWhitespace( drl,
View Full Code Here

        fp2_sfp2.setValue( "44" );
        fp2_sfp2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        fp2_sfp2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        fp2_cfp.addConstraint( fp2_sfp2 );

        cfp.addFactPattern( fp1 );
        cfp.addFactPattern( fp2 );
        m.addLhsItem( cfp );

        String actualDrl = RuleModelDRLPersistenceImpl.getInstance().marshal( m );
        assertEqualsIgnoreWhitespace( drl,
View Full Code Here

        fp2_sfp2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        fp2_sfp2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        fp2_cfp.addConstraint( fp2_sfp2 );

        cfp.addFactPattern( fp1 );
        cfp.addFactPattern( fp2 );
        m.addLhsItem( cfp );

        String actualDrl = RuleModelDRLPersistenceImpl.getInstance().marshal( m );
        assertEqualsIgnoreWhitespace( drl,
                                      actualDrl );
View Full Code Here

        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setValue( "$f2" );
        sfc2.setOperator( "==" );
        p2.addConstraint( sfc2 );

        cp.addFactPattern( p1 );
        cp.addFactPattern( p2 );

        m.addLhsItem( cp );

        String expected = "rule \"t1_0\"\n" +
View Full Code Here

        sfc2.setValue( "$f2" );
        sfc2.setOperator( "==" );
        p2.addConstraint( sfc2 );

        cp.addFactPattern( p1 );
        cp.addFactPattern( p2 );

        m.addLhsItem( cp );

        String expected = "rule \"t1_0\"\n" +
                "dialect \"mvel\"\n" +
View Full Code Here

        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setValue( "$f2" );
        sfc2.setOperator( "==" );
        p2.addConstraint( sfc2 );

        cp.addFactPattern( p1 );
        cp.addFactPattern( p2 );

        m.addLhsItem( cp );

        String expected = "rule \"t1_0\"\n" +
View Full Code Here

        sfc2.setValue( "$f2" );
        sfc2.setOperator( "==" );
        p2.addConstraint( sfc2 );

        cp.addFactPattern( p1 );
        cp.addFactPattern( p2 );

        m.addLhsItem( cp );

        String expected = "rule \"t1_0\"\n" +
                "dialect \"mvel\"\n" +
View Full Code Here

        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setValue( "$f2" );
        sfc2.setOperator( "==" );
        p2.addConstraint( sfc2 );

        cp.addFactPattern( p1 );
        cp.addFactPattern( p2 );

        m.addLhsItem( cp );

        String expected = "rule \"t1_0\"\n" +
View Full Code Here

        sfc2.setValue( "$f2" );
        sfc2.setOperator( "==" );
        p2.addConstraint( sfc2 );

        cp.addFactPattern( p1 );
        cp.addFactPattern( p2 );

        m.addLhsItem( cp );

        String expected = "rule \"t1_0\"\n" +
                "dialect \"mvel\"\n" +
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.