Package org.drools.rule

Examples of org.drools.rule.ContextEntry


                       returnValueDescr,
                       analysis );
       
        ((MVELReturnValueExpression)returnValue.getExpression()).compile((MVELDialectRuntimeData) pkgBuilder.getPackageRegistry( pkg.getName() ).getDialectRuntimeRegistry().getDialectData( "mvel" ));

        ContextEntry retValContext = returnValue.createContextEntry();

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
        final InternalWorkingMemory wm = (InternalWorkingMemory) ruleBase.newStatefulSession();

        final Cheese stilton = new Cheese( "stilton",
View Full Code Here


    public void replaceDeclaration(Declaration oldDecl,
                                   Declaration newDecl) {
    }

    public ContextEntry getContextEntry() {
        return new ContextEntry() {
            private static final long serialVersionUID = 400L;
            private ContextEntry      next;

            public ContextEntry getNext() {
                return this.next;
View Full Code Here

     */
    @Before
    public void setUp() throws IntrospectionException {
        // create mock objects
        constraint = mock( BetaNodeFieldConstraint.class );
        final ContextEntry c = mock( ContextEntry.class );
       
        when( constraint.createContextEntry() ).thenReturn(c);

        this.rule = new Rule( "test-rule" );
        this.context = new PropagationContextImpl( 0,
View Full Code Here

     */
    @Before
    public void setUp() {
        // create mock objects
        constraint = mock(BetaNodeFieldConstraint.class);
        final ContextEntry c = mock(ContextEntry.class);

        when(constraint.createContextEntry()).thenReturn(c);

        this.rule = new Rule("test-rule");
        this.context = new PropagationContextImpl(0,
View Full Code Here

    public Declaration[] getRequiredDeclarations() {
        return this.declarations;
    }

    public ContextEntry getContextEntry() {
        return new ContextEntry() {
            private static final long serialVersionUID = 400L;
            private ContextEntry      next;

            public ContextEntry getNext() {
                return this.next;
View Full Code Here

     */
    @Before
    public void setUp() {
        // create mock objects
        constraint = mock( BetaNodeFieldConstraint.class );
        final ContextEntry c = mock( ContextEntry.class );

        when( constraint.createContextEntry() ).thenReturn( c );

        this.rule = new Rule( "test-rule" );
        this.context = new PropagationContextImpl( 0,
View Full Code Here

        }
    }

    public ContextEntry createContextEntry() {
        if (declarations.length == 0) return null;
        ContextEntry contextEntry = new MvelContextEntry(declarations);
        if (isUnification) {
            contextEntry = new UnificationContextEntry(contextEntry, declarations[0]);
        }
        return contextEntry;
    }
View Full Code Here

                       returnValueDescr,
                       analysis );
       
        ((MVELReturnValueExpression)returnValue.getExpression()).compile( Thread.currentThread().getContextClassLoader() );

        ContextEntry retValContext = returnValue.createContextEntry();

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
        final InternalWorkingMemory wm = (InternalWorkingMemory) ruleBase.newStatefulSession();

        final Cheese stilton = new Cheese( "stilton",
View Full Code Here

    public Object clone() {
        return this;
    }
   
    public ContextEntry createContextEntry() {
        return new ContextEntry() {
            private static final long serialVersionUID = 400L;
            private ContextEntry      next;

            public ContextEntry getNext() {
                return this.next;
View Full Code Here

                       returnValue,
                       returnValueDescr );
       
        ((MVELReturnValueExpression)returnValue.getExpression()).compile( Thread.currentThread().getContextClassLoader() );

        ContextEntry retValContext = returnValue.createContextEntry();

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
        final InternalWorkingMemory wm = (InternalWorkingMemory) ruleBase.newStatefulSession();

        final Cheese stilton = new Cheese( "stilton",
View Full Code Here

TOP

Related Classes of org.drools.rule.ContextEntry

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.