Examples of addFactPattern()


Examples of org.drools.brms.client.modeldriven.brl.CompositeFactPattern.addFactPattern()

        pat.addConstraint( con );

        m.addLhsItem( pat );

        final CompositeFactPattern comp = new CompositeFactPattern( "not" );
        comp.addFactPattern( new FactPattern( "Cancel" ) );
        m.addLhsItem( comp );

        final ActionUpdateField set = new ActionUpdateField();
        set.variable = "p1";
        set.addFieldValue( new ActionFieldValue( "status",
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.brl.CompositeFactPattern.addFactPattern()

public class CompositeFactPatternTest extends TestCase {

    public void testAddPattern() {
        final CompositeFactPattern pat = new CompositeFactPattern();
        final FactPattern x = new FactPattern();
        pat.addFactPattern( x );
        assertEquals( 1,
                      pat.patterns.length );

        final FactPattern y = new FactPattern();
        pat.addFactPattern( y );
View Full Code Here

Examples of org.drools.guvnor.models.commons.shared.rule.CompositeFactPattern.addFactPattern()

        pat.addConstraint( con );

        m.addLhsItem( pat );

        final CompositeFactPattern comp = new CompositeFactPattern( "not" );
        comp.addFactPattern( new FactPattern( "Cancel" ) );
        m.addLhsItem( comp );

        final ActionUpdateField set = new ActionUpdateField();
        set.setVariable( "p1" );
        set.addFieldValue( new ActionFieldValue( "status",
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.CompositeFactPattern.addFactPattern()

        fp1sfc0.setParameter( "fp1sfc0p0",
                              "fp1sfc0p0Value" );
        fp1sfc0.setValue( "fp1sfc0Value" );
        fp1.addConstraint( fp1sfc0 );

        cfp0.addFactPattern( fp0 );
        cfp0.addFactPattern( fp1 );

        model.lhs[0] = cfp0;

        RuleModelCloneVisitor cloneVisitor = new RuleModelCloneVisitor();
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.CompositeFactPattern.addFactPattern()

                              "fp1sfc0p0Value" );
        fp1sfc0.setValue( "fp1sfc0Value" );
        fp1.addConstraint( fp1sfc0 );

        cfp0.addFactPattern( fp0 );
        cfp0.addFactPattern( fp1 );

        model.lhs[0] = cfp0;

        RuleModelCloneVisitor cloneVisitor = new RuleModelCloneVisitor();
        RuleModel clone = cloneVisitor.visitRuleModel( model );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.CompositeFactPattern.addFactPattern()

    private CompositeFactPattern visitCompositeFactPattern(CompositeFactPattern pattern) {
        CompositeFactPattern clone = new CompositeFactPattern();
        clone.type = pattern.type;
        if ( pattern.getPatterns() != null ) {
            for ( IFactPattern fp : pattern.getPatterns() ) {
                clone.addFactPattern( (IFactPattern) visit( fp ) );
            }
        }
        return clone;
    }
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.CompositeFactPattern.addFactPattern()

        pat.addConstraint( con );

        m.addLhsItem( pat );

        final CompositeFactPattern comp = new CompositeFactPattern( "not" );
        comp.addFactPattern( new FactPattern( "Cancel" ) );
        m.addLhsItem( comp );

        final ActionUpdateField set = new ActionUpdateField();
        set.variable = "p1";
        set.addFieldValue( new ActionFieldValue( "status",
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.CompositeFactPattern.addFactPattern()

        SingleFieldConstraint sf1 = new SingleFieldConstraint( "age" );
        sf1.setOperator( "==" );
        sf1.setValue( "42" );
        p1.addConstraint( sf1 );

        cp.addFactPattern( p1 );

        FactPattern p2 = new FactPattern( "Person" );
        SingleFieldConstraint sf2 = new SingleFieldConstraint( "age" );
        sf2.setOperator( "==" );
        sf2.setValue( "43" );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.CompositeFactPattern.addFactPattern()

        SingleFieldConstraint sf2 = new SingleFieldConstraint( "age" );
        sf2.setOperator( "==" );
        sf2.setValue( "43" );
        p2.addConstraint( sf2 );

        cp.addFactPattern( p2 );

        m.addLhsItem( cp );

        String result = BRDRLPersistence.getInstance().marshal( m );
        assertTrue( result
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.CompositeFactPattern.addFactPattern()

        SingleFieldConstraint sf1 = new SingleFieldConstraint( "age" );
        sf1.setOperator( "==" );
        sf1.setValue( "42" );
        p1.addConstraint( sf1 );

        cp.addFactPattern( p1 );

        m.addLhsItem( cp );

        String result = BRDRLPersistence.getInstance().marshal( m );
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.