you need to set a comment value for your task and this will work fine.
there is an open issue for it in the jira check it out.

On Fri, Apr 16, 2010 at 5:19 PM, HMandic <trbuhom@net.hr> wrote:

Hi,

I need some help here.

I have a simple process with one human task. That human task work item has
all the necessary fields filled (actorid, id, name, etc.). When I start that
process it gets to that human task and fills everything it needs in the
database (Postgres) through hibernate. Up until here it works fine.
But then when I need to get a list of tasks for some particular user it
breaks because the task list is empty.

The code looks like this:

*******************************************************************************

BlockingTaskSummaryResponseHandler responseHandler = new
BlockingTaskSummaryResponseHandler();
client.getTasksAssignedAsPotentialOwner("thatUserOfMine", "en-UK",
responseHandler);
List<TaskSummary> tasks = responseHandler.getResults();
TaskSummary task = tasks.get(0);

*******************************************************************************

In that last line I get java.lang.IndexOutOfBoundsException, of course...

Now here's the problem - hibernate generates the following SQL:

*******************************************************************************
[LOG MESSAGE] Message receieved on server :
QueryTasksAssignedAsPotentialOwner
select
       task0_.id as col_0_0_,
       i18ntext4_.text as col_1_0_,
       subjects3_.text as col_2_0_,
       i18ntext5_.text as col_3_0_,
       task0_.status as col_4_0_,
       task0_.priority as col_5_0_,
       task0_.skipable as col_6_0_,
       task0_.actualOwner_id as col_7_0_,
       task0_.createdBy_id as col_8_0_,
       task0_.createdOn as col_9_0_,
       task0_.activationTime as col_10_0_,
       task0_.expirationTime as col_11_0_
from
       test1.Task task0_
               left outer join
                       test1.OrganizationalEntity user1_ on task0_.createdBy_id=user1_.id
               left outer join
                       test1.OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id
               left outer join
                       test1.I18NText subjects3_ on task0_.id=subjects3_.Task_Subjects_Id
    !!!        inner join
                       test1.OrganizationalEntity user7_ on task0_.actualOwner_id=user7_.id
               inner join
                       test1.OrganizationalEntity user8_ on task0_.createdBy_id=user8_.id
               cross join
                       test1.I18NText i18ntext4_
               cross join
                       test1.I18NText i18ntext5_
               cross join
                       test1.OrganizationalEntity organizati6_
where
       organizati6_.id = 'thatUserOfMine'
       and (organizati6_.id in (select potentialo9_.entity_id from
test1.PeopleAssignments_PotentialOwners potentialo9_ where
task0_.id=potentialo9_.task_id))
       and i18ntext4_.language = 'en-UK'
       and (i18ntext4_.id in (select names10_.id from test1.I18NText names10_
where task0_.id=names10_.Task_Names_Id))
       and (subjects3_.language = 'en-UK' or (select
count(subjects11_.Task_Subjects_Id) from test1.I18NText subjects11_ where
task0_.id=subjects11_.Task_Subjects_Id) = 0)
       and (i18ntext5_.language = 'en-UK'
            and (i18ntext5_.id in (select descriptio12_.id from test1.I18NText
descriptio12_ where task0_.id=descriptio12_.Task_Descriptions_Id))
            or (select count(descriptio13_.Task_Descriptions_Id) from
test1.I18NText descriptio13_ where
task0_.id=descriptio13_.Task_Descriptions_Id) = 0)
       and (task0_.status in ('Created' , 'Ready' , 'Reserved' , 'InProgress' ,
'Suspended'))
       and (task0_.expirationTime is null)
;

*******************************************************************************

You will notice the inner join with '!!!' in front of it. That's the reason
why this list is always empty, because at this stage of human task there is
no actual owner, that field is NULL. I've tried different versions of
orm.xml (from 5.0.1, 5.1.0M1 and the latest from trunk) but they all produce
the same error.

Can someone please point out what I'm doing wrong (I'm also not very good
with hibernate).



--
View this message in context: http://n3.nabble.com/Drools-Flow-Another-problem-with-Human-Task-tp724086p724086.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users