Examples of DroolsMVELFactory


Examples of org.drools.base.mvel.DroolsMVELFactory

    public void build(RuleBuildContext context) {
        // pushing consequence LHS into the stack for variable resolution
        context.getBuildStack().push( context.getRule().getLhs() );

        try {
            final DroolsMVELFactory factory = new DroolsMVELFactory( context.getDeclarationResolver().getDeclarations(),
                                                                     null,
                                                                     context.getPkg().getGlobals() );
           
            // This builder is re-usable in other dialects, so specify by name           
            MVELDialect dialect = (MVELDialect) context.getDialect( "mvel" );
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

                                                       dialect.getInterceptors(),
                                                       null,
                                                       null,
                                                       context );

            final DroolsMVELFactory factory = new DroolsMVELFactory( context.getDeclarationResolver().getDeclarations(),
                                                                     null,
                                                                     context.getPkg().getGlobals(),
                                                                     analysis.getBoundIdentifiers() );

            context.getRule().setConsequence( new MVELConsequence( expr,
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

        MVELDialect dialect = (MVELDialect) context.getDialect();

        final Declaration[] sourceDeclArr = (Declaration[]) source.getOuterDeclarations().values().toArray( new Declaration[0] );

        final DroolsMVELFactory factory = new DroolsMVELFactory( context.getDeclarationResolver().getDeclarations(),
                                                                 source.getOuterDeclarations(),
                                                                 context.getPkg().getGlobals() );

        Accumulator accumulator = null;
        Declaration[] declarations = null;
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

        final FromDescr fromDescr = (FromDescr) descr;

        final AccessorDescr accessor = (AccessorDescr) fromDescr.getDataSource();
        DataProvider dataProvider = null;
        try {
            final DroolsMVELFactory factory = new DroolsMVELFactory( context.getDeclarationResolver().getDeclarations(),
                                                                     null,
                                                                     context.getPkg().getGlobals() );

            // This builder is re-usable in other dialects, so specify by name
            MVELDialect dialect = (MVELDialect) context.getDialect( "mvel" );
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

            localMap.put( localDeclarations[i].getIdentifier(),
                          localDeclarations[i] );
        }

        try {
            final DroolsMVELFactory factory = new DroolsMVELFactory( previousMap,
                                                                     localMap,
                                                                     context.getPkg().getGlobals() );

            Dialect.AnalysisResult analysis = context.getDialect().analyzeExpression( context,
                                                                                      predicateDescr,
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

            localMap.put( localDeclarations[i].getIdentifier(),
                          localDeclarations[i] );
        }
       
        try {
            final DroolsMVELFactory factory = new DroolsMVELFactory( previousMap,
                                                                     localMap,
                                                                     context.getPkg().getGlobals() );               
           
            Dialect.AnalysisResult analysis = context.getDialect().analyzeExpression( context,
                                                                                      predicateDescr,
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

    public void build(RuleBuildContext context) {
        // pushing consequence LHS into the stack for variable resolution
        context.getBuildStack().push( context.getRule().getLhs() );

        try {
            final DroolsMVELFactory factory = new DroolsMVELFactory( context.getDeclarationResolver().getDeclarations(),
                                                                     null,
                                                                     context.getPkg().getGlobals() );
           
            // This builder is re-usable in other dialects, so specify by name           
            MVELDialect dialect = (MVELDialect) context.getDialect( "mvel" );
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

                                                       analysis,
                                                       dialect.getInterceptors(),
                                                       null,
                                                       context );

            final DroolsMVELFactory factory = new DroolsMVELFactory( context.getDeclarationResolver().getDeclarations(),
                                                                     null,
                                                                     context.getPkg().getGlobals(),
                                                                     analysis.getBoundIdentifiers() );

            context.getRule().setConsequence( new MVELConsequence( expr,
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

        MVELDialect dialect = (MVELDialect) context.getDialect();

        final Declaration[] sourceDeclArr = (Declaration[]) source.getOuterDeclarations().values().toArray( new Declaration[0] );

        final DroolsMVELFactory factory = new DroolsMVELFactory( context.getDeclarationResolver().getDeclarations(),
                                                                 source.getOuterDeclarations(),
                                                                 context.getPkg().getGlobals() );

        Accumulator accumulator = null;
        Declaration[] declarations = null;
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

    if (action instanceof DroolsConsequenceAction) {
      String actionString = ((DroolsConsequenceAction) action).getConsequence();
        ExpressionCompiler compiler = new ExpressionCompiler(actionString);
        ParserContext parserContext = new ParserContext();
        Serializable expression = compiler.compile(parserContext);
        DroolsMVELFactory factory = new DroolsMVELFactory(Collections.EMPTY_MAP, null, Collections.EMPTY_MAP);
        MVEL.executeExpression(expression, null, factory);
    } else {
      throw new RuntimeException("Unknown action: " + action);
    }
      triggerCompleted();
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.