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

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


                      m.lhs.length );

        assertEquals( 1,
                      m.rhs.length );

        ActionCallMethod actionCallMethod = (ActionCallMethod) m.rhs[ 0 ];
        assertEquals( "testFunction",
                      actionCallMethod.getMethodName() );
        assertEquals( "$t",
                      actionCallMethod.getVariable() );
        assertEquals( 2,
                      actionCallMethod.getFieldValues().length );

        assertEquals( "testFunction",
                      actionCallMethod.getFieldValue( 0 ).getField() );
        assertEquals( "123",
                      actionCallMethod.getFieldValue( 0 ).getValue() );
        assertEquals( FieldNatureType.TYPE_LITERAL,
                      actionCallMethod.getFieldValue( 0 ).getNature() );
        assertEquals( "Integer",
                      actionCallMethod.getFieldValue( 0 ).getType() );

        assertEquals( "testFunction",
                      actionCallMethod.getFieldValue( 1 ).getField() );
        assertEquals( "hello",
                      actionCallMethod.getFieldValue( 1 ).getValue() );
        assertEquals( FieldNatureType.TYPE_LITERAL,
                      actionCallMethod.getFieldValue( 1 ).getNature() );
        assertEquals( "String",
                      actionCallMethod.getFieldValue( 1 ).getType() );
    }
View Full Code Here


                               position );
    }

    private void addCallMethod( String itemText,
                                int position ) {
        this.model.addRhsItem( new ActionCallMethod( itemText ),
                               position );
    }
View Full Code Here

                               position );
    }

    private void addCallMethod( String itemText,
                                int position ) {
        this.model.addRhsItem( new ActionCallMethod( itemText ),
                               position );
    }
View Full Code Here

        this.variable = variable;
        this.methodName = methodName;
        this.parameters = parameters;

        ActionCallMethod actionCallMethod = new ActionCallMethod();
        actionCallMethod.setMethodName( methodName );
        actionCallMethod.setVariable( variable );
        actionCallMethod.setState( 1 );

        for ( ActionFieldFunction parameter : getActionFieldFunctions() ) {
            actionCallMethod.addFieldValue( parameter );
        }

        return actionCallMethod;
    }
View Full Code Here

TOP

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

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.