Examples of ExpressionVariable


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

        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

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionVariable

        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 {
                //TODO {baunax} fix it!!! to make recursive
                variable = new ExpressionFieldVariable( attrib );
            }
            expression.appendPart( variable );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionVariable

        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 {
                //TODO {baunax} fix it!!! to make recursive
                variable = new ExpressionFieldVariable( attrib );
            }
            expression.appendPart( variable );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionVariable

        String attrib = value.substring(dotPos + 1);
        if (prefix.equals(VARIABLE_VALUE_PREFIX)) {
            FactPattern fact = getRuleModel().getBoundFact(attrib);
            ExpressionPart variable;
            if (fact!=null){
                variable = new ExpressionVariable(fact);
            }else{
               variable = new ExpressionFieldVariable(attrib);
            }
            expression.appendPart(variable);
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionVariable

    String attrib = value.substring(dotPos + 1);
    if (prefix.equals(VARIABLE_VALUE_PREFIX)) {
      FactPattern fact = getRuleModel().getBoundFact(attrib);
      ExpressionPart variable;
      if (fact != null) {
        variable = new ExpressionVariable(fact);
      } else {
        //TODO {baunax} fix it!!! to make recursive
        variable = new ExpressionFieldVariable(attrib);
      }
      expression.appendPart(variable);
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.brl.ExpressionVariable

        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

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

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

        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

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

        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

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

        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
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.