Examples of DroolsMVELFactory


Examples of org.drools.base.mvel.DroolsMVELFactory

                           Tuple leftTuple,
                           InternalFactHandle handle,
                           Declaration[] declarations,
                           Declaration[] innerDeclarations,
                           WorkingMemory workingMemory) throws Exception {
        DroolsMVELFactory factory = (DroolsMVELFactory) workingMemoryContext;
        factory.setContext( leftTuple,
                            null,
                            handle.getObject(),
                            workingMemory,
                            null );
        final Object value = MVEL.executeExpression( this.expression,
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

                        Tuple leftTuple,
                        InternalFactHandle handle,
                        Declaration[] declarations,
                        Declaration[] innerDeclarations,
                        WorkingMemory workingMemory) throws Exception {
        DroolsMVELFactory factory = (DroolsMVELFactory) workingMemoryContext;
        factory.setContext( leftTuple,
                               null,
                               handle.getObject(),
                               workingMemory,
                               null );
        final Object value = MVEL.executeExpression( this.expression,
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

        for ( int i = 0, length = localDeclarations.length; i < length; i++ ) {
            localMap.put( localDeclarations[i].getIdentifier(),
                     localDeclarations[i] );
        }            
       
        final DroolsMVELFactory factory = new DroolsMVELFactory(previousMap, localMap,  context.getPkg().getGlobals() );
       
        Dialect.AnalysisResult analysis = context.getDialect().analyzeExpression( context,
                                                                                  returnValueRestrictionDescr,
                                                                                  returnValueRestrictionDescr.getContent() );
       
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

                                      final Pattern prefixPattern) {
        // it must be an EvalDescr
        final EvalDescr evalDescr = (EvalDescr) descr;

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

            Dialect.AnalysisResult analysis = context.getDialect().analyzeExpression( context,
                                                                                      evalDescr,
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() );
            factory.setNextFactory( ((MVELDialect) context.getDialect()).getStaticMethodImportResolverFactory() );               
           
            Dialect.AnalysisResult analysis = context.getDialect().analyzeExpression( context,
                                                                                      predicateDescr,
                                                                                      predicateDescr.getContent() );
           
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() );
            MVELDialect dialect = (MVELDialect) context.getDialect( "mvel" );
            // This builder is re-usable in other dialects, so specify by name
            factory.setNextFactory( dialect.getStaticMethodImportResolverFactory() );

            Dialect.AnalysisResult analysis = dialect.analyzeExpression( context,
                                                                         context.getRuleDescr(),
                                                                         (String) context.getRuleDescr().getSalience() );
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() );
           
            factory.setNextFactory( dialect.getStaticMethodImportResolverFactory() );           

            context.getRule().setConsequence( new MVELConsequence( expr,
                                                                   factory ) );
        } catch ( final Exception e ) {
            context.getErrors().add( new RuleError( context.getRule(),
View Full Code Here

Examples of org.drools.base.mvel.DroolsMVELFactory

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

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

        final DroolsMVELFactory factory = new DroolsMVELFactory( context.getDeclarationResolver().getDeclarations(),
                                                                 sourcePattern.getOuterDeclarations(),
                                                                 context.getPkg().getGlobals() );
        factory.setNextFactory( dialect.getStaticMethodImportResolverFactory() );

        Accumulator accumulator = null;
        Declaration[] declarations = null;

        if ( accumDescr.isExternalFunction() ) {
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" );

            factory.setNextFactory( dialect.getStaticMethodImportResolverFactory() );

            String text = (String) accessor.toString();
            Dialect.AnalysisResult analysis = dialect.analyzeExpression( context,
                                                                         descr,
                                                                         text );
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.