JBPM 4.2 - User Task List
rockerrocker Dec 18, 2009 11:10 AMHi,
I have a process as shown below -
<process-definition xmlns="http://jbpm.org/4.2/jpdl" name="pdPlaceOrder1">
<start name="start">
<transition name="trPlaceOrder1" to="PlaceOrder1"/>
</start>
<task name="PlaceOrder1" assignee="user1,user2" form="pages/client/placeOrder1.xhtml">
<transition name="next" to="Confirm" />
<transition name="cancel" to="error" />
</task>
<task name="Confirm" assignee="user1" form="pages/client/confirmOrder.xhtml">
<transition name="next" to="end" />
<transition name="cancel" to="error" />
</task>
<end name="error" />
<end name="end" />
</process-definition>
This process is deployed and started successfully. The current state is at task PlaceOrder1 level. The jbpm4_task table shows entry for this record with assignee = 'user1,user2' .
30009, 'T', 1, 'PlaceOrder1', '', 'open', '', 'user1,user2', 'pages/client/placeOrder1.xhtml', 0, '2009-12-18 10:49:18', '', , b, 'pdPlaceOrder1.30007', 'PlaceOrder1', b, , 30007, 30007, , 'PlaceOrder1'
I am trying to fetch all tasks for user1, so my code is
List<Task> taskList = taskService.findPersonalTasks("user1");
But this returns nothing as query says -
Hibernate: select taskimpl0_.DBID_ as DBID1_7_, taskimpl0_.DBVERSION_ as DBVERSION3_7_, taskimpl0_.NAME_ as NAME4_7_, taskimp
l0_.DESCR_ as DESCR5_7_, taskimpl0_.STATE_ as STATE6_7_, taskimpl0_.SUSPHISTSTATE_ as SUSPHIST7_7_, taskimpl0_.ASSIGNEE_ as A
SSIGNEE8_7_, taskimpl0_.FORM_ as FORM9_7_, taskimpl0_.PRIORITY_ as PRIORITY10_7_, taskimpl0_.CREATE_ as CREATE11_7_, taskimpl
0_.DUEDATE_ as DUEDATE12_7_, taskimpl0_.PROGRESS_ as PROGRESS13_7_, taskimpl0_.SIGNALLING_ as SIGNALLING14_7_, taskimpl0_.EXE
CUTION_ID_ as EXECUTION15_7_, taskimpl0_.ACTIVITY_NAME_ as ACTIVITY16_7_, taskimpl0_.HASVARS_ as HASVARS17_7_, taskimpl0_.SUP
ERTASK_ as SUPERTASK18_7_, taskimpl0_.EXECUTION_ as EXECUTION19_7_, taskimpl0_.PROCINST_ as PROCINST20_7_, taskimpl0_.SWIMLAN
E_ as SWIMLANE21_7_, taskimpl0_.TASKDEFNAME_ as TASKDEF22_7_ from JBPM4_TASK taskimpl0_ where taskimpl0_.ASSIGNEE_=? order by taskimpl0_.PRIORITY_ desc
If i have just user1 in task table the query returns task correctly. How do i get task for user1, if task needs either of 2 users can process it ??
HappyHolidays ..
RockerRocker