2 Replies Latest reply on Mar 30, 2006 9:31 AM by david.trattnig

    TaskInstance.setPooledActors() --> org.hibernate.PropertyAcc

    david.trattnig

      In my Node-Enter-Action I've got following code:

      //create a new task-instance
       TaskInstance taskInstance = context.getTaskMgmtInstance().createTaskInstance();
       taskInstance.setActorId(taskBean.getActorId());
       HashSet<String> pooledActors = new HashSet<String>();
       pooledActors.add(taskBean.getPooledGroupId());
       taskInstance.setPooledActors(pooledActors);
       context.setTaskInstance(taskInstance);
       taskInstance.start();
      


      When running the code it ends with following exception:
      ERROR [.db.JbpmSession: 105] org.hibernate.PropertyAccessException: could not get a field value by reflection getter of org.jbpm.taskmgmt.exe.PooledActor.id

      When I remove "taskInstance.setPooledActors(pooledActors);" it works. What's the Problem with Hibernate?

      Regards,
      david


        • 1. Re: TaskInstance.setPooledActors() --> org.hibernate.Propert
          david.trattnig

          Maybe it's usefull to mention: I have jBPM 3.0.2

          • 2. Don't assign a task in the ActionHandler!
            david.trattnig

            Solved! (or better: workaround...)

            If there is a known bug or if anyone has the same problem:

            The above exception was thrown, cuz i tried to implemented Koen Aers idea (see http://jboss.org/index.html?module=bb&op=viewtopic&t=78075) - I wanted to create a taskInstance at the node-enter event of the task-node (trough an Action-Handler).

            In my action handler i made a "taskInstance.setPooledActors(pooledActors);"

            But it seems that there are problems with the Hibernate-Tables: The entries in the tables "jbpm_taskactorpool" and "jbpm_pooledactors" will be only created if the setPooledActors is called from the right context - the AssignmentHandler.

            No I've trown away the approach to assign the task in the ActionHandler and moved it right back to the AssignmentHandler and it works fine. :)

            jPBP-Team, could you give me some information how the PooledActors are created?

            Cheers,
            david