-
1. Re: Unable to getTasksAssigned in JBPM5
salaboy21 Nov 14, 2011 8:22 AM (in response to andy.yeung)Can you check the human-tasks tests, I remember that there are some tests checking that particular situations. If you don't find any we will need to create them, but as far as I remember there were some test around the group assignments.
https://github.com/droolsjbpm/jbpm/tree/master/jbpm-human-task/src/test/java/org/jbpm/task/service/
Cheers
-
2. Re: Unable to getTasksAssigned in JBPM5
andy.yeung Nov 14, 2011 10:05 PM (in response to andy.yeung)I found a group example in jbpm-examples. I found that the creator and actualowner is also null. I think that's by design since the user not yet pick up the task yet. I found that JBPM 5 is using hibernate 3.3. I will try to downgrade the hibernate version and see how's the SQL are generated. I guess the implicit join in the query t.taskData.createdBy and t.taskData.actualOwner force the hibernate engine to generate inner join statement.
-
3. Re: Unable to getTasksAssigned in JBPM5
andy.yeung Nov 14, 2011 10:23 PM (in response to andy.yeung)1 of 1 people found this helpfulAlright, confirmed the query work on hibernate 3.3. It seems that after hibernate 3.3, any implicit join syntax will trigger the additional inner join. I have tried 3.6.8 and 3.5.6 and both version added the additional inner join to the generated query.
-
4. Re: Unable to getTasksAssigned in JBPM5
andy.yeung Nov 14, 2011 10:47 PM (in response to andy.yeung)By converting the query from
select
new org.jbpm.task.query.TaskSummary(
...
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime)
from
Task t
left join t.taskData.createdBy
left join t.taskData.actualOwner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity potentialOwners
where ...
to
select
new org.jbpm.task.query.TaskSummary(
...
a,
c,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime)
from
Task t
left join t.taskData.createdBy as c
left join t.taskData.actualOwner as a
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity potentialOwners
where ...
Now I am able to get the correct query result.
-
5. Re: Unable to getTasksAssigned in JBPM5
jbize Mar 1, 2012 1:49 PM (in response to andy.yeung)So I presume this is a bug... at least in that the latest version of jBPM is dependent on obsolete versions of Hibernate.
But is it a bug in jBPM 5.2, or Hibernate 3.5+?
Is there an updated Taskorm.xml that will work correctly with Hibernate 3.5+?
If I replace all the createdBy and actualOwner instances in Taskorm.xml as specified above, is that sufficient to use Hibernate 3.5.Final?
Thank you.
-
6. Re: Unable to getTasksAssigned in JBPM5
andy.yeung Mar 1, 2012 10:04 PM (in response to jbize)Yes, I am now using Hibernate 3.6.9.Final and JBPM function correctly after I update the taskorm.xml.
You can refer to https://hibernate.onjira.com/browse/HHH-4091 for details