Should I log this as a JIRA
ticket.
Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get
hold of WorkItem object
Hi,
There is a change done in Drools
5.1.0.M2 - org.drools.workflow.instance.node.WorkItemNodeInstance class
in the method
public void
triggerCompleted(WorkItem workItem) at line 196 which is setting the workItemId as -1
this.workItemId = -1;
Due to the above change the
listeners which are attached to the “complete” event of the work item –
such as the method below
public void
beforeNodeLeft(ProcessNodeLeftEvent event)
are not able to get hold of the associated workitem object as it returns null.
Is there any specific reason
that workItemId is set to -1 even before the associated listeners get triggered
or is this a bug?
If it was an intended change
then how do I get hold of the “WorkItem” object in the attached listeners.
Thanks
Vijay
p.s This change was not there in
the snapshot of 18th April 2010 which I was earlier working on. Above
is the only change in this class from the snapshot of 18th April and
5.1.0.M2