1 Reply Latest reply on Oct 3, 2005 9:21 AM by julian_k

    TaskInstance setName fails

    julian_k

      When I set the TaskInstance name via the setName method, the name does not get persisted to the database. However when I setActorId, the information does get stored to the database.

      TaskInstance startTask = processInstance.getTaskMgmtInstance().createStartTaskInstance();
      startTask.setActorId(assignmentExpression);
      startTask.setName("New Name");
      


      I know there is an outstanding issue with not being able to set TaskInstance descriptions, but does this also apply to the name field? I tried to use my own TaskInstance subclass, but that does not seem to persist properly either. Here is what I added to the TaskInstance Hibernate config:
       <joined-subclass name="MyTaskInstance"
       table="MY_TASKINSTANCE"
       lazy="false">
       <key column="ID_"/>
       <property name="description" column="DESCRIPTION_" length="4000"/>
       <property name="hyperlink" column="HYPERLINK_" length="4000"/>
       </joined-subclass>
      


      I also mapped this in the jBPM properties file and recompiled the jBPM core jar. I am using jBPM 3.

      Thanks,
      Julian

        • 1. Re: TaskInstance setName fails
          julian_k

          Well I got this functionality working through my subclass. This now makes my TaskInstances support dynamic descriptions. I am not sure what went wrong. Either way, I think it would be extremely benefical if the task declarations in XML was somehow aware of custom fields so they could be statically declared on process deploy. Finally, I believe setting the TaskInstance description without affecting the underlying Task definition to be necessary.

          Thanks,
          Julian