[rules-users] Resuming Flow: NPE when completing a work item

tolitius webakaunt at gmail.com
Tue Apr 13 16:52:42 EDT 2010


It seems that if the Drools Flow Workitem has ANY parameters mapped (e.g.
<mapping type="in" from="someId" to="someId" />), the InputMarshaller's for
loop gets executed:

        int nbParameters = stream.readInt();

        for ( int i = 0; i < nbParameters; i++ ) {
            String name = stream.readUTF();

            Object value = stream.readObject();          //  Always a NULL
RuleBase ==> Null Pointer Exception down the line inside the callback of
this method (as described above) !!!!
            workItem.setParameter( name, value );      //   Never gets here

   Which internally calls MarshallerReaderContext.resolveClass, and throws a
NullPointerException.

   Seems like a very dangerous place to have a bug ( if it is a bug, of
course ), since that means that nobody actually resumed workitems with
parameters [ in a different thread / execution ] after the flow was
suspended... Also I did not find any framework tests for it [ separate
threaded (real life) ones ].

/Anatoly

P.S. I guess it is missed because Drools Flow rely on the out of the box
WSHumanTask implementation (that is coupled with MinaServer, hence we don't
use it). But, again, that is really strange, if it is a bug of course..
-- 
View this message in context: http://n3.nabble.com/Resuming-Flow-NPE-when-completing-a-work-item-tp716847p717126.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list