-
1. Re: Is there a way to identify process variable with each node instance
wguo Jul 23, 2014 6:25 AM (in response to wguo)For example : there are two variables A and B , two human tasks H1 and H2 ,
After user completed H1 , the variable A is set to valueA
After user completed H2 , the variable B is set to valueB and the variable A is set to valueC
After the process completed , i want to list all the human tasks and the variables ralated with it :
Human Task Data
H1 A=valueA
H2 A=valueC , B=valueB
Is it possible ?
-
2. Re: Is there a way to identify process variable with each node instance
mdegan Sep 2, 2014 2:38 AM (in response to wguo)1 of 1 people found this helpfulHi,
WorkItemInfo is the table that holds information for the HumanTasks as far as I can see. So you can try something like:
HumanTaskNodeInstance htask = (HumanTaskNodeInstance) nodeInstance;
htask.getWorkItem().getParameters()
I havent tried this out, but this should give you some information on the information related to the task. Apart from this, all information for variables is stored in variableinstancelog, but that gets overwritten each time a variable value is updated. So you will only be able to get the latest values on the variables in that and not the node wise update.
Regards,
Manny
-
3. Re: Is there a way to identify process variable with each node instance
salaboy21 Sep 2, 2014 4:17 AM (in response to wguo)1 of 1 people found this helpfulYes this is possible, but in order to get that information (and more) we usually suggest to attach your own custom process and tasks listeners. This is how the jBPM Console is Working. We are using the listeners defined in jbpm-audit and jbpm-human-task-audit modules to store information about the execution, then with that information already stored we can build our UIs to display in the most convenient way.
HTH.
Regards
-
4. Re: Is there a way to identify process variable with each node instance
wguo Sep 3, 2014 3:02 AM (in response to mdegan)Yes , i can get the value related with current node via getWorkItem().getResults() and then store it in db , and we can display it on our ui later .