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

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


            for ( int i = 0; i < splits.length - 1; i++ ) {
                String expressionPart = splits[i].trim();
                if ("this".equals(expressionPart)) {
                    expression.appendPart(new ExpressionField(expressionPart, factType, DataType.TYPE_THIS));
                } else if (isBoundParam) {
                    expression.appendPart(new ExpressionVariable(expressionPart, factType, factType));
                    isBoundParam = false;
                } else {
                    ModelField currentField = findField(typeFields, expressionPart);
                    expression.appendPart(new ExpressionField(expressionPart, currentField.getType(), currentField.getClassName()));
                    typeFields = modelFields.get(currentField.getType());
View Full Code Here


        String attrib = value.substring( dotPos + 1 );
        if ( prefix.equals( VARIABLE_VALUE_PREFIX ) ) {
            FactPattern fact = getRuleModel().getLHSBoundFact( attrib );
            ExpressionPart variable;
            if ( fact != null ) {
                variable = new ExpressionVariable( fact );
            } else {
                //if the variable is not bound to a Fact Pattern then it must be bound to a Field
                String lhsBindingType = getRuleModel().getLHSBindingType( attrib );
                variable = new ExpressionFieldVariable( attrib,
                                                        lhsBindingType );
View Full Code Here

        final CompositeFactPattern cp = new CompositeFactPattern( CompositeFactPattern.COMPOSITE_TYPE_NOT );

        final FactPattern fp2 = new FactPattern( "Person" );
        final FromCompositeFactPattern ffp1 = new FromCompositeFactPattern();
        ffp1.setExpression( new ExpressionFormLine( new ExpressionVariable( fp1 ) ) );
        ffp1.setFactPattern( fp2 );
        cp.addFactPattern( ffp1 );
        m.addLhsItem( cp );

        final String actual = BRDRLPersistence.getInstance().marshal( m );
View Full Code Here

        final CompositeFactPattern cp = new CompositeFactPattern( CompositeFactPattern.COMPOSITE_TYPE_NOT );

        final FactPattern fp2 = new FactPattern( "Person" );
        final FromCompositeFactPattern ffp1 = new FromCompositeFactPattern();
        ffp1.setExpression( new ExpressionFormLine( new ExpressionVariable( fp1 ) ) );
        ffp1.setFactPattern( fp2 );
        cp.addFactPattern( ffp1 );
        m.addLhsItem( cp );

        final String actual = BRDRLPersistence.getInstance().marshal( m );
View Full Code Here

        String attrib = value.substring( dotPos + 1 );
        if ( prefix.equals( VARIABLE_VALUE_PREFIX ) ) {
            FactPattern fact = getRuleModel().getLHSBoundFact( attrib );
            ExpressionPart variable;
            if ( fact != null ) {
                variable = new ExpressionVariable( fact );
            } else {
                //if the variable is not bound to a Fact Pattern then it must be bound to a Field
                String lhsBindingType = getRuleModel().getLHSBindingType( attrib );
                variable = new ExpressionFieldVariable( attrib,
                                                        lhsBindingType );
View Full Code Here

TOP

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

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.