1 Reply Latest reply on Apr 28, 2009 8:36 AM by Jose Rodriguez

    Extending JobSession functionality

    Jose Rodriguez Newbie

      Hi, I am working with version 3.3.1, but I guess the question is valid for 3.2.x. I want to extend the functionality of the JobSession class for being able to retrieve information about locked/suspended jobs.

      I would like to extend this class and have my own version, however, for being able to use it later on in an effective manner, I believe I have to extend as well JbpmConfiguration and JbpmContext.

      If possible I would prefer to extend instead of modifying these three classes. I have been reviewing the code but I don't see a clean way of doing it, mainly because of the getInstance methods in JbpmConfiguration and JbpmSession.

      I would appreciate any suggestion.

      Thanks in advance.
      Jose.

        • 1. Re: Extending JobSession functionality
          Jose Rodriguez Newbie

          Just had the inspiration after posting the previous message.

          The easy/clean way is extending the JobSession, adding the method with the new functionality and add a constructor to the new class using as a parameter the Session (Hibernate session).

          The session can be retrieved from the jbpmContext. I was missing this part, and all my problems were originally produced because I didn't know how to retrieve the Session.

          Regards.
          Jose.