[jboss-user] [jBPM] - Re: How to get current node instance in a workitem handler?

J Xmith do-not-reply at jboss.com
Sun Apr 15 17:23:29 EDT 2012


J Xmith [https://community.jboss.org/people/xmithj] created the discussion

"Re: How to get current node instance in a workitem handler?"

To view the discussion, visit: https://community.jboss.org/message/730140#730140

--------------------------------------------------------------
Hi Affan,

I have got the same problem (your use cases are very valid). But I don’t understand your workaround. Currently the work item handler doesn’t have access to the knowledge session, so I am not sure what do you mean with “could just retrieve the process instance from the session and find…”  Could you please elaborate here?

I tried injecting the knowledge session at work item creation time (effectively achieving having the ksession inside the work item handler), but then when I was testing persistence and resuming after a crash I found the retrieved ksession was not identical to the original ksession that created/started the flow, and I found myself doing complex coding to try to solve problems. When my code became more complex than necessary, I realised everything would have been very simple if I could fetch the ksession from the  WorkItemManager. However the jbpm team has decided to hide the ksession from the work item, and very likely this mean we shouldn’t try to inject the ksession inside the work item ourselves. 

I would be very interested to see what Kris is able to provide here. 

Thanks in advance,
John.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/730140#730140]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120415/3c694b31/attachment.html 


More information about the jboss-user mailing list