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

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


    //ActionSetField and ActionUpdateField need to be grouped in this manner.
    private LabelledAction findByLabelledAction( List<LabelledAction> actions,
                                                 String boundName,
                                                 boolean isUpdate ) {
        for ( LabelledAction labelledAction : actions ) {
            IAction action = labelledAction.action;
            if ( action instanceof ActionFieldList ) {
                if ( labelledAction.boundName.equals( boundName ) && labelledAction.isUpdate == isUpdate ) {
                    return labelledAction;
                }
            }
View Full Code Here


    //Labelled Actions are used to group actions on the same bound Fact. Only
    //ActionSetField and ActionUpdateField need to be grouped in this manner.
    private LabelledAction findByLabelledAction( List<LabelledAction> actions,
                                                 String boundName ) {
        for ( LabelledAction labelledAction : actions ) {
            IAction action = labelledAction.action;
            if ( action instanceof ActionFieldList ) {
                if ( labelledAction.boundName.equals( boundName ) ) {
                    return labelledAction;
                }
            }
View Full Code Here

                    actions.add( action );
                }
            }
            model.rhs = new IAction[ actions.size() ];
            for ( int i = 0; i < actions.size(); i++ ) {
                final IAction action = actions.get( i );
                if ( action instanceof ActionSetFieldWrapper ) {
                    model.rhs[ i ] = ( (ActionSetFieldWrapper) action ).getAction();
                } else {
                    model.rhs[ i ] = action;
                }
View Full Code Here

        assertEquals( "$f",
                      sfp.getFieldBinding() );

        assertEquals( 1,
                      m.rhs.length );
        IAction a = m.rhs[ 0 ];
        assertTrue( a instanceof ActionInsertFact );

        ActionInsertFact ap = (ActionInsertFact) a;
        assertEquals( "Person",
                      ap.getFactType() );
View Full Code Here

        assertEquals( BaseSingleFieldConstraint.TYPE_LITERAL,
                      sfp.getConstraintValueType() );

        assertEquals( 1,
                      m.rhs.length );
        IAction a = m.rhs[ 0 ];
        assertTrue( a instanceof ActionInsertFact );

        ActionInsertFact ap = (ActionInsertFact) a;
        assertEquals( "Person",
                      ap.getFactType() );
View Full Code Here

        assertEquals( "$f",
                      sfp.getFieldBinding() );

        assertEquals( 1,
                      m.rhs.length );
        IAction a = m.rhs[ 0 ];
        assertTrue( a instanceof ActionUpdateField );

        ActionUpdateField ap = (ActionUpdateField) a;
        assertEquals( "$p",
                      ap.getVariable() );
View Full Code Here

        assertEquals( 0,
                      fp.getNumberOfConstraints() );

        assertEquals( 1,
                      m.rhs.length );
        IAction a = m.rhs[ 0 ];
        assertTrue( a instanceof ActionUpdateField );

        ActionUpdateField ap = (ActionUpdateField) a;
        assertEquals( "$p",
                      ap.getVariable() );
View Full Code Here

        assertEquals( "$f",
                      sfp.getFieldBinding() );

        assertEquals( 1,
                      m.rhs.length );
        IAction a = m.rhs[ 0 ];
        assertTrue( a instanceof ActionInsertFact );

        ActionInsertFact ap = (ActionInsertFact) a;
        assertEquals( "Person",
                      ap.getFactType() );
View Full Code Here

        assertEquals( BaseSingleFieldConstraint.TYPE_LITERAL,
                      sfp.getConstraintValueType() );

        assertEquals( 1,
                      m.rhs.length );
        IAction a = m.rhs[ 0 ];
        assertTrue( a instanceof ActionInsertFact );

        ActionInsertFact ap = (ActionInsertFact) a;
        assertEquals( "Person",
                      ap.getFactType() );
View Full Code Here

        assertEquals( "$f",
                      sfp.getFieldBinding() );

        assertEquals( 1,
                      m.rhs.length );
        IAction a = m.rhs[ 0 ];
        assertTrue( a instanceof ActionUpdateField );

        ActionUpdateField ap = (ActionUpdateField) a;
        assertEquals( "$p",
                      ap.getVariable() );
View Full Code Here

TOP

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

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.