Examples of ActionUpdateField


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

    @Test
    public void testRHSNonEmptyStringValues() {
        FactPattern fp = new FactPattern( "Smurf" );
        fp.setBoundName( "p1" );

        ActionUpdateField auf1 = new ActionUpdateField( "p1" );
        auf1.addFieldValue( new ActionFieldValue( "name",
                                                  "$name",
                                                  DataType.TYPE_STRING ) );
        auf1.getFieldValues()[ 0 ].setNature( BaseSingleFieldConstraint.TYPE_TEMPLATE );

        ActionUpdateField auf2 = new ActionUpdateField( "p1" );
        auf2.addFieldValue( new ActionFieldValue( "age",
                                                  "$age",
                                                  DataType.TYPE_NUMERIC_INTEGER ) );
        auf2.getFieldValues()[ 0 ].setNature( BaseSingleFieldConstraint.TYPE_TEMPLATE );

        //Test 1
        TemplateModel m1 = new TemplateModel();
        m1.addLhsItem( fp );
        m1.addRhsItem( auf1 );
View Full Code Here

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

    @Test
    public void testRHSDelimitedNonEmptyStringValues() {
        FactPattern fp = new FactPattern( "Smurf" );
        fp.setBoundName( "p1" );

        ActionUpdateField auf1 = new ActionUpdateField( "p1" );
        auf1.addFieldValue( new ActionFieldValue( "name",
                                                  "$name",
                                                  DataType.TYPE_STRING ) );
        auf1.getFieldValues()[ 0 ].setNature( BaseSingleFieldConstraint.TYPE_TEMPLATE );

        ActionUpdateField auf2 = new ActionUpdateField( "p1" );
        auf2.addFieldValue( new ActionFieldValue( "age",
                                                  "$age",
                                                  DataType.TYPE_NUMERIC_INTEGER ) );
        auf2.getFieldValues()[ 0 ].setNature( BaseSingleFieldConstraint.TYPE_TEMPLATE );

        //Test 1
        TemplateModel m1 = new TemplateModel();
        m1.addLhsItem( fp );
        m1.addRhsItem( auf1 );
View Full Code Here

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

        asf.setVariable( "$a" );
        asf.addFieldValue( new ActionFieldValue( "age",
                                                 "33",
                                                 DataType.TYPE_NUMERIC_INTEGER ) );

        final ActionUpdateField auf = new ActionUpdateField();
        asf.setVariable( "$m" );
        asf.addFieldValue( new ActionFieldValue( "amount",
                                                 "10000",
                                                 DataType.TYPE_NUMERIC_INTEGER ) );
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.