[rules-users] How to access process variables within a work-item (human task)
Robert
robert.weissmann at web.de
Mon Apr 26 01:56:58 EDT 2010
Hi,
I have
...
StatefulKnowledgeSession
ksession.getWorkItemManager().registerWorkItemHandler("Human Task",
taskHandler);
...
Map<String, Object> processVariables = new HashMap<String, Object>();
processVariables.put("equipment", "OvenQP33");
ProcessInstance pi = ksession.startProcess(processName,
processVariables);
...
... within the taskHandler.executeWorkItem(WorkItem workItem,
WorkItemManager workItemManager):
I am setting a break-point, and I am getting there, but how am I able to
access my processVariables or even set specific data for this particular
work-item ?
I tried using as described in the doc "9.1 Human tasks inside processes":
- Parameter mapping: Allows copying the value of process variables to
parameters of the human task. Upon creation of the human tasks, the
values will be copied.
But without any success. I just not getting to the "equipment" variable,
which I need at this point of processing the work-item.
The mapping I did: "equipment" -> "equipment". With the hope to find them
within workItem.getParameters(), but they are not there and nowhere-else
too.
Any ideas ?
Generally there are even many more settings possible for the human task,
see doc (here the list:
Id,Name,TaskName,Priority,Comment,ActorId,Skippable,Content,Swimlane,On-entry
and on-exit actions,Parameter mapping,Result mapping,Timers,ParentId), but
only a few are accessible through workItem.getParameters(). The others ?
Also, no idea to get this data.
Cheers, Rob.
--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
More information about the rules-users
mailing list