2 Replies Latest reply on Jun 30, 2008 5:06 PM by sreepathia

    Custom TaskInstance as EJB3 entity, how to?


      I'd like to extend TaskInstance. In particular customised task instance has to keep references to other EJB3 entities (to be used in queries for instance).

      How it could be implemented/configured?

      P.S. I use Hibernate as JPA implementation

        • 1. Re: Custom TaskInstance as EJB3 entity, how to?

          It seems that Hibernate does not allow to derive custom TaskInstance as EJB3 entity. And jBPM queries its own TaskIntanceS, so we have to derive from TaskInstance. My guess is I won't succeed with that.

          Nevertheless how to get my custom TaskInstance beeing EJB3 entity or referencing another EJB3 entity?

          Case 1. Deriving @Entity from TaskInstance. It requires to override all properties with appropriate annotations. In this case the problem is in TaskMgmtInstance which queries just TaskInstance.
          Case 2. Deriving class from TaskInstance and add it to hibernate.cfg.xml. In this case hibernate does not know EJB3 entities referenced from introduced custom taskinstance.
          Case 3. Splitting jbpm-jpdl.jar into two jars, particularly extract entity classes from it. Then introducing @Entity version of all the jbpm entities (another version of second jar). Looks optimistic at the first glance. But I'm not sure that there is no pitfalls connected to Session on which jBPM implementation relies.

          What you would suggest?

          • 2. Re: Custom TaskInstance as EJB3 entity, how to?

            Hey,I have a similar requirement. What is the approach you took for this.
            appreciate your reply on this