Chris,
Yes, we can only assure you the work item exists between it is triggered
and completed (or aborted). So if you want to access any data related
to it in an on-exit action or any further part of the process, it's
probably best to simply map that data to a process variable. This will
make you action code a lot simpler as well.
Kris
Quoting Chris Raschl <c.raschl-mailinglists(a)dyless.com>:
Hi Kris,
we experienced some troubles with our drools flow integration today
(we upgraded to the lastest snapshot) and I found out that is has to
do with a fix (see [1]) you commited some time ago.
Our problem is, that we access the data submitted by the user to
finish a human task in the on exit action of the human task node
like this:
WorkItemNodeInstance wini =
(WorkItemNodeInstance)context.getNodeInstance();
Map<String, Object> result = (Map<String,
Object>)wini.getWorkItem().getResult("Result");
This results in a NPE because the workItemId is set to -1 in the
WorkItemNodeInstance
before getWorkItem() is called. So getWorkItem() returns null.
Is there a better (recommended) way to work with human task data?
Maybe using an
out-mapping?
Thanks,
chris
[1]
http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/jav...
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
Disclaimer:
http://www.kuleuven.be/cwis/email_disclaimer.htm