5 Replies Latest reply on Nov 22, 2005 10:20 AM by Yunfeng Hou

    save jbpm object in jbpm implementation

    Yunfeng Hou Newbie

      I saw codes as below

      JbpmSession jbpmSession = JbpmSession.getCurrentJbpmSession();
      if (jbpmSession!=null) {
      // give this process instance an id

      many times in the source code, and I think we can have a static save method in jbpm session, so the code above would become


      Much cleaner, and hides the hibernate detail from the objects should have no knowledge. Except for various session objects, I can see that only save and update will be required by def and instance objects. In JbpmSession.save method, we can call saveOrUpdate of hibernate for these kind of usage.

      Yunfeng Hou