Package org.drools.brms.client.modeldriven.brl

Examples of org.drools.brms.client.modeldriven.brl.ActionInsertFact


        m.addLhsItem( new FactPattern( "Person" ) );
        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        m.name = "my rule";

        final String drl = p.marshal( m );
        assertEquals( expected,
                      drl );
View Full Code Here


        Z.value = "foo";
        Z.operator = "==";

        p.addConstraint( Z );

        ActionInsertFact ass = new ActionInsertFact("Whee");
        m.addRhsItem( ass );

        String actual = BRDRLPersistence.getInstance().marshal( m );
        String expected = "rule \"with composite\" " +
            " \tdialect \"mvel\"\n when " +
View Full Code Here

    public void testAssertWithDSL() throws Exception {
        RuleModel m = new RuleModel();
        DSLSentence sen = new DSLSentence();
        sen.sentence = "I CAN HAS DSL";
        m.addRhsItem( sen );
        ActionInsertFact ins = new ActionInsertFact("Shizzle");
        ActionFieldValue val = new ActionFieldValue("goo", "42", "Numeric");
        ins.fieldValues = new ActionFieldValue[1];
        ins.fieldValues[0] = val;
        m.addRhsItem( ins );
View Full Code Here

        m.addLhsItem( new FactPattern( "Person" ) );
        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        m.name = "my rule";

        final String drl = p.marshal( m );
        assertEquals( expected,
                      drl );
View Full Code Here

        Z.value = "foo";
        Z.operator = "==";
       
        p.addConstraint( Z );
       
        ActionInsertFact ass = new ActionInsertFact("Whee");
        m.addRhsItem( ass );
       
        String actual = BRDRLPersistence.getInstance().marshal( m );
        String expected = "rule \"with composite\" " +
            " \tdialect \"mvel\"\n when " +
View Full Code Here

    public void testAssertWithDSL() throws Exception {
        RuleModel m = new RuleModel();
        DSLSentence sen = new DSLSentence();
        sen.sentence = "I CAN HAS DSL";
        m.addRhsItem( sen );
        ActionInsertFact ins = new ActionInsertFact("Shizzle");
        ActionFieldValue val = new ActionFieldValue("goo", "42", "Numeric");
        ins.fieldValues = new ActionFieldValue[1];
        ins.fieldValues[0] = val;
        m.addRhsItem( ins );
View Full Code Here

        m.addLhsItem( new FactPattern( "Person" ) );
        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        m.name = "my rule";
        final String xml = p.marshal( m );
        //System.out.println(xml);
        assertTrue( xml.indexOf( "Person" ) > -1 );
        assertTrue( xml.indexOf( "Accident" ) > -1 );
View Full Code Here

        Z.value = "foo";
        Z.operator = "==";
       
        p.addConstraint( Z );
       
        ActionInsertFact ass = new ActionInsertFact("Whee");
        m.addRhsItem( ass );

       
        String xml = BRXMLPersistence.getInstance().marshal( m );
        //System.err.println(xml);
View Full Code Here

        m.addLhsItem( new FactPattern( "Person" ) );
        m.addLhsItem( new FactPattern( "Accident" ) );
        m.addAttribute( new RuleAttribute( "no-loop",
                                           "true" ) );

        m.addRhsItem( new ActionInsertFact( "Report" ) );
        m.name = "my rule";

        final String drl = p.marshal( m );
        assertEquals( expected,
                      drl );
View Full Code Here

        Z.value = "foo";
        Z.operator = "==";

        p.addConstraint( Z );

        ActionInsertFact ass = new ActionInsertFact("Whee");
        m.addRhsItem( ass );

        String actual = BRDRLPersistence.getInstance().marshal( m );
        String expected = "rule \"with composite\" " +
            " \tdialect \"mvel\"\n when " +
View Full Code Here

TOP

Related Classes of org.drools.brms.client.modeldriven.brl.ActionInsertFact

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.