client.getTasksAssignedAsPotentialOwner("Joe", "en-UK", summaryHandler); This method used the "en-UK" for i18n reasons.. you need to set the field content (and I'm sure right now, because that I don't have the source code here) and the field comment to "en-UK".
2010/4/22 rudolf michael <roud...@gmail.com> > and the hibernate hql query > select > new org.drools.task.query.TaskSummary( > t.id, > names.text, > subject.text, > descriptions.text, > t.taskData.status, > t.priority, > t.taskData.skipable, > 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, > I18NText names, > I18NText descriptions, > OrganizationalEntity potentialOwners > where > potentialOwners.id = :userId and > potentialOwners in elements ( t.peopleAssignments.potentialOwners ) > and > > names.language = :language and > names in elements( t.names) and > > subject.language = :language and > > descriptions.language = :language and > descriptions in elements( t.descriptions) and > > t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', > 'Suspended') and > > t.taskData.expirationTime is null > > On Thu, Apr 22, 2010 at 5:33 PM, rudolf michael <roud...@gmail.com> wrote: > >> and this is how i am listing the tasks. >> try { >> MinaTaskClient client = new MinaTaskClient("client 1", new >> TaskClientHandler(SystemEventListenerFactory.getSystemEventListener())); >> NioSocketConnector connector = new NioSocketConnector(); >> SocketAddress address = new InetSocketAddress("127.0.0.1",9123); >> client.connect(connector, address); >> BlockingTaskSummaryResponseHandler summaryHandler = new >> BlockingTaskSummaryResponseHandler(); >> client.getTasksAssignedAsPotentialOwner("Joe", "en-UK", summaryHandler); >> List<TaskSummary> arg0 = summaryHandler.getResults(); >> System.out.println("Joe's task list size is "+arg0.size()); >> for(int i=0; i < arg0.size(); i++){ >> System.out.println("Task Listed for Administrator >> "+arg0.get(i).getId()+", name="+arg0.get(i).getName()+", >> status="+arg0.get(i).getStatus()); >> } >> }catch(Exception ex){ >> } >> >> are you sure that you're connecting to the same TaskService that the >> drools flow engine is connected to? >> >> On Thu, Apr 22, 2010 at 5:29 PM, rudolf michael <roud...@gmail.com>wrote: >> >>> well i had your problem when i started doing some human task processing >>> then after i have set the Comment for the tasks, the task list worked fine >>> for me. >>> Find below my Test case logs: >>> >>> Hibernate: update ProcessInstanceInfo set externalVariables=?, >>> lastModificationDate=?, lastReadDate=?, processId=?, >>> processInstanceByteArray=?, startDate=?, state=?, OPTLOCK=? where >>> processInstanceId=? and OPTLOCK=? >>> Hibernate: select user_.id from OrganizationalEntity user_ where >>> user_.id=? >>> Hibernate: insert into Task (allowedToDelegate, taskInitiator_id, >>> priority, activationTime, actualOwner_id, createdBy_id, createdOn, >>> documentAccessType, documentContentId, documentType, expirationTime, >>> faultAccessType, faultContentId, faultName, faultType, outputAccessType, >>> outputContentId, outputType, parentId, previousStatus, skipable, status, >>> workItemId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, >>> ?, ?, ?, ?) >>> Hibernate: update WorkItemInfo set creationDate=?, name=?, >>> processInstanceId=?, state=?, OPTLOCK=?, workItemByteArray=? where >>> workItemId=? and OPTLOCK=? >>> Hibernate: insert into I18NText (language, text) values (?, ?) >>> Hibernate: update SessionInfo set dirty=?, lastModificationDate=?, >>> rulesByteArray=?, startDate=? where id=? >>> Hibernate: insert into I18NText (language, text) values (?, ?) >>> Hibernate: insert into I18NText (language, text) values (?, ?) >>> Hibernate: update I18NText set Task_Descriptions_Id=? where id=? >>> Hibernate: update I18NText set Task_Names_Id=? where id=? >>> Hibernate: insert into PeopleAssignments_BusinessAdministrators (task_id, >>> entity_id) values (?, ?) >>> Hibernate: insert into PeopleAssignments_PotentialOwners (task_id, >>> entity_id) values (?, ?) >>> Hibernate: update I18NText set Task_Subjects_Id=? where id=? >>> INFO: RECEIVED: HeapBuffer[pos=0 lim=199 cap=2048: 00 00 00 C3 AC ED 00 >>> 05 73 72 01 00 1F 6F 72 67...] >>> [2010:04:112 17:04:846:debug] Message receieved on server : >>> QueryTasksAssignedAsPotentialOwner >>> [2010:04:112 17:04:846:debug] Arguments : [Joe, en-UK] >>> Task Claimed for Joe, Task Name=1 >>> Apr 22, 2010 5:23:13 PM org.apache.mina.filter.logging.LogLevel$4 log >>> INFO: SENT: HeapBuffer[pos=0 lim=216 cap=256: 00 00 00 D4 AC ED 00 05 73 >>> 72 01 00 1F 6F 72 67...] >>> Apr 22, 2010 5:23:13 PM org.apache.mina.filter.logging.LogLevel$4 log >>> INFO: SENT: HeapBuffer[pos=0 lim=0 cap=0: empty] >>> [2010:04:112 17:04:886:debug] Message receieved on client : >>> AddTaskResponse >>> [2010:04:112 17:04:887:debug] Arguments : [1] >>> Hibernate: 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 Task task0_ left outer join >>> OrganizationalEntity user1_ on task0_.createdBy_id=user1_.id left outer join >>> OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer >>> join I18NText subjects3_ on task0_.id=subjects3_.Task_Subjects_Id, I18NText >>> i18ntext4_, I18NText i18ntext5_, OrganizationalEntity organizati6_ where >>> organizati6_.id=? and (organizati6_.id in (select potentialo9_.entity_id >>> from PeopleAssignments_PotentialOwners potentialo9_ where >>> task0_.id=potentialo9_.task_id)) and i18ntext4_.language=? and >>> (i18ntext4_.id in (select names10_.id from I18NText names10_ where >>> task0_.id=names10_.Task_Names_Id)) and subjects3_.language=? and >>> i18ntext5_.language=? and (i18ntext5_.id in (select descriptio11_.id from >>> I18NText descriptio11_ where task0_.id=descriptio11_.Task_Descriptions_Id)) >>> and (task0_.status in ('Created' , 'Ready' , 'Reserved' , 'InProgress' , >>> 'Suspended')) and (task0_.expirationTime is null) >>> Apr 22, 2010 5:23:13 PM org.apache.mina.filter.logging.LogLevel$4 log >>> INFO: RECEIVED: HeapBuffer[pos=0 lim=1036 cap=2048: 00 00 01 57 AC ED 00 >>> 05 73 72 01 00 1F 6F 72 67...] >>> Hibernate: select user0_.id as id64_0_ from OrganizationalEntity user0_ >>> where user0_.id=? and user0_.DTYPE='User' >>> [2010:04:112 17:04:896:debug] Message receieved on server : >>> RegisterForEventRequest >>> [2010:04:112 17:04:896:debug] Arguments : >>> [org.drools.task.event.taskevent...@c6e7d8b, true, >>> org.drools.process.workitem.wsht.WSHumanTaskHandler] >>> [2010:04:112 17:04:898:debug] Message receieved on server : >>> RegisterForEventRequest >>> [2010:04:112 17:04:898:debug] Arguments : >>> [org.drools.task.event.taskevent...@28075cfe, true, >>> org.drools.process.workitem.wsht.WSHumanTaskHandler] >>> [2010:04:112 17:04:898:debug] Message receieved on server : >>> RegisterForEventRequest >>> [2010:04:112 17:04:898:debug] Arguments : >>> [org.drools.task.event.taskevent...@28f7c114, true, >>> org.drools.process.workitem.wsht.WSHumanTaskHandler] >>> [2010:04:112 17:04:901:debug] Message receieved on client : >>> QueryTaskSummaryResponse >>> [2010:04:112 17:04:901:debug] Arguments : >>> [[org.drools.task.query.tasksumm...@a467e05f]] >>> Joe's task list size is 1 >>> Task Listed for Administrator 1, name=User submits request, >>> status=Reserved >>> >>> On Thu, Apr 22, 2010 at 4:16 PM, HMandic <trbu...@net.hr> wrote: >>> >>>> >>>> Still no resolution... >>>> >>>> I was reading through gazillion rows of log output (I've put >>>> log4j.logger.org.hibernate=debug and >>>> log4j.logger.org.hibernate.hql.ast.AST=debug in log4j.properties) for >>>> the >>>> last few days, and still can't figure it out. >>>> It has nothing to do with my human task item (I populated all the >>>> fields). >>>> The problem remains that hibernate generates the wrong SQL from >>>> "TasksAssignedAsPotentialOwner" (named query as found in orm.xml). It >>>> generates inner join on actualOwner which is null before somebody claims >>>> that task, that way I'll never get the list of tasks that I need to >>>> claim. >>>> >>>> I'm using hibernate 3.5.1FINAL and orm.xml from drools 5.1.0M1 (but it's >>>> the >>>> same as in 5.0.1). >>>> >>>> Could it be that I'm the only one with this problem? >>>> -- >>>> View this message in context: >>>> http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Another-problem-with-Human-Task-tp724086p742826.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 >>>> >>> >>> >> > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > -- - http://salaboy.wordpress.com - http://www.jbug.com.ar - Salatino "Salaboy" Mauricio -
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users