<div dir="ltr">you need to set a comment value for your task and this will work fine.<div>there is an open issue for it in the jira check it out.<br><br><div class="gmail_quote">On Fri, Apr 16, 2010 at 5:19 PM, HMandic <span dir="ltr"><<a href="mailto:trbuhom@net.hr">trbuhom@net.hr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Hi,<br>
<br>
I need some help here.<br>
<br>
I have a simple process with one human task. That human task work item has<br>
all the necessary fields filled (actorid, id, name, etc.). When I start that<br>
process it gets to that human task and fills everything it needs in the<br>
database (Postgres) through hibernate. Up until here it works fine.<br>
But then when I need to get a list of tasks for some particular user it<br>
breaks because the task list is empty.<br>
<br>
The code looks like this:<br>
<br>
*******************************************************************************<br>
<br>
BlockingTaskSummaryResponseHandler responseHandler = new<br>
BlockingTaskSummaryResponseHandler();<br>
client.getTasksAssignedAsPotentialOwner("thatUserOfMine", "en-UK",<br>
responseHandler);<br>
List<TaskSummary> tasks = responseHandler.getResults();<br>
TaskSummary task = tasks.get(0);<br>
<br>
*******************************************************************************<br>
<br>
In that last line I get java.lang.IndexOutOfBoundsException, of course...<br>
<br>
Now here's the problem - hibernate generates the following SQL:<br>
<br>
*******************************************************************************<br>
[LOG MESSAGE] Message receieved on server :<br>
QueryTasksAssignedAsPotentialOwner<br>
select<br>
task0_.id as col_0_0_,<br>
i18ntext4_.text as col_1_0_,<br>
subjects3_.text as col_2_0_,<br>
i18ntext5_.text as col_3_0_,<br>
task0_.status as col_4_0_,<br>
task0_.priority as col_5_0_,<br>
task0_.skipable as col_6_0_,<br>
task0_.actualOwner_id as col_7_0_,<br>
task0_.createdBy_id as col_8_0_,<br>
task0_.createdOn as col_9_0_,<br>
task0_.activationTime as col_10_0_,<br>
task0_.expirationTime as col_11_0_<br>
from<br>
test1.Task task0_<br>
left outer join<br>
test1.OrganizationalEntity user1_ on task0_.createdBy_id=user1_.id<br>
left outer join<br>
test1.OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id<br>
left outer join<br>
test1.I18NText subjects3_ on task0_.id=subjects3_.Task_Subjects_Id<br>
!!! inner join<br>
test1.OrganizationalEntity user7_ on task0_.actualOwner_id=user7_.id<br>
inner join<br>
test1.OrganizationalEntity user8_ on task0_.createdBy_id=user8_.id<br>
cross join<br>
test1.I18NText i18ntext4_<br>
cross join<br>
test1.I18NText i18ntext5_<br>
cross join<br>
test1.OrganizationalEntity organizati6_<br>
where<br>
organizati6_.id = 'thatUserOfMine'<br>
and (organizati6_.id in (select potentialo9_.entity_id from<br>
test1.PeopleAssignments_PotentialOwners potentialo9_ where<br>
task0_.id=potentialo9_.task_id))<br>
and i18ntext4_.language = 'en-UK'<br>
and (i18ntext4_.id in (select names10_.id from test1.I18NText names10_<br>
where task0_.id=names10_.Task_Names_Id))<br>
and (subjects3_.language = 'en-UK' or (select<br>
count(subjects11_.Task_Subjects_Id) from test1.I18NText subjects11_ where<br>
task0_.id=subjects11_.Task_Subjects_Id) = 0)<br>
and (i18ntext5_.language = 'en-UK'<br>
and (i18ntext5_.id in (select descriptio12_.id from test1.I18NText<br>
descriptio12_ where task0_.id=descriptio12_.Task_Descriptions_Id))<br>
or (select count(descriptio13_.Task_Descriptions_Id) from<br>
test1.I18NText descriptio13_ where<br>
task0_.id=descriptio13_.Task_Descriptions_Id) = 0)<br>
and (task0_.status in ('Created' , 'Ready' , 'Reserved' , 'InProgress' ,<br>
'Suspended'))<br>
and (task0_.expirationTime is null)<br>
;<br>
<br>
*******************************************************************************<br>
<br>
You will notice the inner join with '!!!' in front of it. That's the reason<br>
why this list is always empty, because at this stage of human task there is<br>
no actual owner, that field is NULL. I've tried different versions of<br>
orm.xml (from 5.0.1, 5.1.0M1 and the latest from trunk) but they all produce<br>
the same error.<br>
<br>
Can someone please point out what I'm doing wrong (I'm also not very good<br>
with hibernate).<br>
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://n3.nabble.com/Drools-Flow-Another-problem-with-Human-Task-tp724086p724086.html" target="_blank">http://n3.nabble.com/Drools-Flow-Another-problem-with-Human-Task-tp724086p724086.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br></div></div>