Package org.drools.workbench.models.commons.shared.rule

Examples of org.drools.workbench.models.commons.shared.rule.ActionFieldValue


    private ActionInsertFact visitActionFieldList( ActionInsertFact afl ) {
        ActionInsertFact clone = new ActionInsertFact();
        clone.setFactType( afl.getFactType() );
        clone.setBoundName( afl.getBoundName() );
        for ( ActionFieldValue afv : afl.getFieldValues() ) {
            ActionFieldValue afvClone = new ActionFieldValue();
            afvClone.setField( afv.getField() );
            afvClone.setNature( afv.getNature() );
            afvClone.setType( afv.getType() );
            afvClone.setValue( afv.getValue() );
            clone.addFieldValue( afvClone );
        }
        return clone;
    }
View Full Code Here


    private ActionSetField visitActionFieldList( ActionSetField afl ) {
        ActionSetField clone = new ActionSetField();
        clone.setVariable( afl.getVariable() );
        for ( ActionFieldValue afv : afl.getFieldValues() ) {
            ActionFieldValue afvClone = new ActionFieldValue();
            afvClone.setField( afv.getField() );
            afvClone.setNature( afv.getNature() );
            afvClone.setType( afv.getType() );
            afvClone.setValue( afv.getValue() );
            clone.addFieldValue( afvClone );
        }
        return clone;
    }
View Full Code Here

    private ActionUpdateField visitActionFieldList( ActionUpdateField afl ) {
        ActionUpdateField clone = new ActionUpdateField();
        clone.setVariable( afl.getVariable() );
        for ( ActionFieldValue afv : afl.getFieldValues() ) {
            ActionFieldValue afvClone = new ActionFieldValue();
            afvClone.setField( afv.getField() );
            afvClone.setNature( afv.getNature() );
            afvClone.setType( afv.getType() );
            afvClone.setValue( afv.getValue() );
            clone.addFieldValue( afvClone );
        }
        return clone;
    }
View Full Code Here

                if ( isDSLEnhanced ) {
                    buf.append( ">" );
                }
                buf.append( variableName );

                ActionFieldValue fieldValue = fieldValues[ i ];
                if ( fieldValue instanceof ActionFieldFunction ) {
                    buf.append( "." );
                    buf.append( fieldValue.getField() );
                } else {
                    buf.append( ".set" );
                    buf.append( Character.toUpperCase( fieldValues[ i ].getField().charAt( 0 ) ) );
                    buf.append( fieldValues[ i ].getField().substring( 1 ) );
                }
View Full Code Here

                return new ActionWorkItemFieldValue( field, DataType.TYPE_NUMERIC_INTEGER, "WorkItem", wiParam, Integer.class.getName() );
            } else if ( wiParam.equals( "FloatResult" ) ) {
                return new ActionWorkItemFieldValue( field, DataType.TYPE_NUMERIC_FLOAT, "WorkItem", wiParam, Float.class.getName() );
            }
        }
        return new ActionFieldValue( field, adjustParam( dataType, value, isJavaDialect ), dataType );
    }
View Full Code Here

        comp.addFactPattern( new FactPattern( "Cancel" ) );
        m.addLhsItem( comp );

        final ActionUpdateField set = new ActionUpdateField();
        set.setVariable( "p1" );
        set.addFieldValue( new ActionFieldValue( "status",
                                                 "rejected",
                                                 DataType.TYPE_STRING ) );
        m.addRhsItem( set );

        final ActionRetractFact ret = new ActionRetractFact( "p1" );
View Full Code Here

                if ( isDSLEnhanced ) {
                    buf.append( ">" );
                }
                buf.append( variableName );

                ActionFieldValue fieldValue = fieldValues[ i ];
                if ( fieldValue instanceof ActionFieldFunction ) {
                    buf.append( "." );
                    buf.append( fieldValue.getField() );
                } else {
                    buf.append( ".set" );
                    buf.append( Character.toUpperCase( fieldValues[ i ].getField().charAt( 0 ) ) );
                    buf.append( fieldValues[ i ].getField().substring( 1 ) );
                }
View Full Code Here

                return new ActionWorkItemFieldValue( field, DataType.TYPE_NUMERIC_INTEGER, "WorkItem", wiParam, Integer.class.getName() );
            } else if ( wiParam.equals( "FloatResult" ) ) {
                return new ActionWorkItemFieldValue( field, DataType.TYPE_NUMERIC_FLOAT, "WorkItem", wiParam, Float.class.getName() );
            }
        }
        return new ActionFieldValue( field, adjustParam( dataType, value, isJavaDialect ), dataType );
    }
View Full Code Here

        dt.getActionCols().add( ins );

        BRLActionColumn brlAction = new BRLActionColumn();
        ActionInsertFact aif = new ActionInsertFact( "Person" );
        aif.setBoundName( "$aif" );
        aif.addFieldValue( new ActionFieldValue( "rating",
                                                 null,
                                                 DataType.TYPE_STRING ) );
        aif.getFieldValues()[ 0 ].setNature( BaseSingleFieldConstraint.TYPE_LITERAL );

        brlAction.getDefinition().add( aif );
View Full Code Here

        dt.getActionCols().add( ins2 );

        BRLActionColumn brlAction = new BRLActionColumn();
        ActionInsertFact aif = new ActionInsertFact( "Person" );
        aif.setBoundName( "$aif" );
        aif.addFieldValue( new ActionFieldValue( "rating",
                                                 null,
                                                 DataType.TYPE_STRING ) );
        aif.getFieldValues()[ 0 ].setNature( BaseSingleFieldConstraint.TYPE_LITERAL );

        brlAction.getDefinition().add( aif );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.commons.shared.rule.ActionFieldValue

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.