Mark,

   What is the status on MVEL stuff used in core?

   []s
   Edson

2007/4/6, vista2007 <my_vista2007@yahoo.com >:

I implement the following logic using 3.1M edition,

package com.software.warehouse.rules.impl ;

#list any import classes here.
import com.software.warehouse.model.Item;
import com.software.warehouse.model.ItemCollect;


#declare any global variables here

global com.software.warehouse.model.ItemCollect itemCollect;

rule "Rule 1"

salience 20
        when
                # itemCollect.getItemList() method returns a List of objects

                             m : Item(status == Item.ACTIVE ) from
itemCollect.getItemList()

        then
                m.setStatus(Item.INACTIVE);
                System.out.println(m.getStatus());
        end


It gave me the followin error.

ObjectAsserted:
handle=[fid:1:1:com.software.warehouse.model.ItemCollect@12a3722];
object=com.software.warehouse.model.ItemCollect@12a3722]
org.mvel.PropertyAccessException: null pointer exception in property:
itemCollect.getItemList().list()
        at
org.mvel.optimizers.impl.refl.ReflectiveOptimizer.compileGetChain(ReflectiveOptimizer.java:137)
        at
org.mvel.optimizers.impl.refl.ReflectiveOptimizer.optimize (ReflectiveOptimizer.java:92)
        at org.mvel.Token.getReducedValueAccelerated(Token.java:302)
        at org.mvel.ExecutableAccessor.getValue(ExecutableAccessor.java:46)
        at org.mvel.MVEL.executeExpression (MVEL.java:173)
        at
org.drools.base.dataproviders.MVELDataProvider.getResults(MVELDataProvider.java:43)
        at org.drools.reteoo.FromNode.assertTuple(FromNode.java:61)
        at
org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple (SingleTupleSinkAdapter.java:55)
        at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:147)
        at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java :20)
        at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:163)
        at org.drools.reteoo.Rete.assertObject(Rete.java:121)
        at
org.drools.reteoo.ReteooRuleBase.assertObject( ReteooRuleBase.java:196)
        at
org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.propagate(ReteooWorkingMemory.java:157)
        at
org.drools.common.AbstractWorkingMemory.propagateQueuedActions (AbstractWorkingMemory.java:998)
        at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:733)


Can anyone please help me to slove this problum. Thank You.
--
View this message in context: http://www.nabble.com/3.1-M-Help-Needed-tf3535402.html#a9868300
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3124-6000
  Mobile: +55 11 9218-4151
  JBoss, a division of Red Hat @ www.jboss.com