Details
-
Bug
-
Resolution: Done
-
Blocker
-
5.1.0.M1
Description
When trying to complete the work item [if it has ANY parameters mapped (e.g. <mapping type="in" from="someId" to="someId" />)], internally Drools Flow is using JPA persistence module to find ( retrieve ) a work item to be completed from a WorkItemInfo table.
Interestingly enough, if you look at the "getWorkItem" method of the "org.drools.persistence.processinstance.WorkItemInfo", it passes a NULL for a RuleBase while setting up a context:
public WorkItem getWorkItem() {
if ( workItem == null ) {
try {
ByteArrayInputStream bais = new ByteArrayInputStream( workItemByteArray );
MarshallerReaderContext context = new MarshallerReaderContext( bais,
null, // THIS IS a RULEBASE <<<<<<<<<<<<<
null,
null );
workItem = InputMarshaller.readWorkItem( context );
And right after that, when trying to set parameters on the work item, it uses that RuleBase in MarshallerReaderContext:
protected Class< ? > resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
String name = desc.getName();
try
catch (ClassNotFoundException ex)
{ return super.resolveClass( desc ); }
}
Again, this happens after the flow is resumed having workitem(s) 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