11 Replies Latest reply on Jul 24, 2007 10:55 AM by harpritt

    Usage of pooledTaskInstanceList

    limousyf

      Hello,

      I'm trying to use a BP I created and deployed in my newly created seam app.
      I've created a mysql database for JBPM and linked it to my process.
      Everything went almost fine during deployment (ie tons of warnings but no errors) and the mysql base was filled (tables created and data inserted).

      But when I try to access a default pooledTaskInstanceList - which was copy/pasted from a seam book - this error occur :

      rendered="#{empty pooledTaskInstanceList}": Cannot get value for expression '#{org.jboss.seam.core.pooledTaskInstanceList}'

      The console tells me that it was created by:

      Caused by: org.jbpm.JbpmException: couldn't get pooled task instances list for actors '[]'

      (snip)

      Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [

      select distinct ti
      from org.jbpm.taskmgmt.exe.PooledActor pooledActor
      join pooledActor.taskInstances ti
      where pooledActor.actorId in ( )
      and ti.actorId is null
      and ti.isSuspended != true
      and ti.isOpen = true

      ]

      I noticed a unusual number of tables in the JBPM database compare to my previous deployments (in non-seam apps) : I only have 29 tables instead of 33.
      Don't know if it matters because I was working in jbpm 3.1.2 before, compared to version 3.1.4 in my seam app.

      Am I using correctly pooledTaskInstanceList ?
      Isn't it supposed to print, well nothing, if I don't have any tasks or actors created ?

      Well thanks for any help on this.

      By the way, my apps versions:

      Seam 1.2.1GA
      JBoss AS 4.0.5
      JBPM 3.1.4 (the version used in my seam dist)
      BrainPower 0.0 ;)

        • 1. Re: Usage of pooledTaskInstanceList
          limousyf

          By the way, the "tons of warnings" was this kind of lines:

          10:55:18,981 WARN [JDBCExceptionReporter] Unknown table 'JBPM_VARIABLEINSTANCE'
          10:55:19,153 WARN [JDBCExceptionReporter] SQL Warning: 1051, SQLState: 42S02

          But JBPM_VARIABLEINSTANCE table actually exists in my mysql db

          • 2. Re: Usage of pooledTaskInstanceList
            torsty

            I am using the pooledTaskInstanceList without problems.

            But

            couldn't get pooled task instances list for actors '[]'

            looks like you haven't set the actor in your authenticate method, i. e. something like:

             actor.getGroupActorIds().add( "myGroupActorId" );
            


            • 3. Re: Usage of pooledTaskInstanceList
              gavin.king

              Yes, exactly, you need to initialize the group actor ids.

              • 4. Re: Usage of pooledTaskInstanceList
                limousyf

                yes, I was stuck with another problem - the persistence of a logged user in session context - so I couldn't try your tip.

                But it's working perfectly well now, thanks guys :)

                • 5. Re: Usage of pooledTaskInstanceList
                  campi

                  Hi,
                  I have a question regarding the use of the pooledTaskInstanceList

                  I need to inject this component into a SLSB because I need to filter the List before using it into a datatable (some users from different entity have the same actor assigned because they have the same role within the application, but a user in a entity shouldn't be able to seen the task of an user in another entity)

                  I have try to do it by injecting the component :

                  @In(value="#{org.jboss.seam.core.pooledTaskInstanceList}",required=false)
                  private PooledTaskInstanceList pooledTaskInstanceList;
                  


                  If you have any idea, this will be very helpful.


                  • 6. Re: Usage of pooledTaskInstanceList
                    pmuir

                    Try

                    @In(required=false)
                    private List pooledTaskInstanceList;


                    It would be neater to create a new Seam component based on pooledTaskInstanceList which does the filtering for you rather than injecting and outjecting as you describe.

                    • 7. Re: Usage of pooledTaskInstanceList
                      campi

                      Thanks for the advise, it's worked fine.

                      • 8. Re: Usage of pooledTaskInstanceList
                        campi

                        I have an another question concerning TaskInstance.

                        I am using Jbpm variable to stock an id so I can retrieve information from my database when I list the taskInstance that I need.
                        I wanted to known how I could load the current taskInstance that is associated to this id (that i get from the database).

                        This will be very helpful,
                        Thanks in advance.

                        • 9. Re: Usage of pooledTaskInstanceList
                          harpritt

                          YIPPEEEEE i was looking for this all over the place...

                          Thank you Google...

                          • 10. Re: Usage of pooledTaskInstanceList
                            harpritt

                            PS... ill bodge it with the injection for now.. and then when i have more time ill workout how to write a custom component....

                            .... if anyone has a useful link about custom components please post it, it would help me out a lot.

                            • 11. Re: Usage of pooledTaskInstanceList
                              harpritt

                              .... crap.. i just worked out what you mean by creating a seam component... argggggggg im a noob ima noooooooooob