4 Replies Latest reply on Dec 14, 2005 4:52 AM by nick_nickolov

    Getting process definition XML source from the database.

    saviola

      Helllo, JBPM fellows and contributors!
      I am reading with interest almost all the postings in the forum.
      Now I have a question. Is there any way so the "XML representation" of a process definition be fetched from a database. What I mean by "XML representation" is the XML source that was used to deploy a process definition.
      Thanks in advance and regards for any help offered

        • 1. Re: Getting process definition XML source from the database.
          enazareno

          Hello,

          Why not create a process deployer class that deploys your process and save your xml on the database as text at the same time, i.e. if you have not started yet. Just get the process id out so you can reference your xml file. If you have already started and want to view existing process in xml, i think you can create one be querying the struc using jdbc and forming the xml. I don't know if they have a method to reverse-engineer that directly. Anyway, just a suggestion.

          Regards,

          Elmo

          • 2. Re: Getting process definition XML source from the database.
            aguizar

            There's an alternate approach that requires no coding at all. Just store a copy of your process definition anywhere in the process archive, in addition to processdefinition.xml. That way, the deployer will treat the copy as a resource file and save it to the database.

            Perhaps the deployer should have the option to save processdefinition.xml as a resource. What do you guys think?

            • 3. Re: Getting process definition XML source from the database.
              saviola

              The second approach seems simple since it looks this is the natural way of doing what I want at the moment.
              Thanks, guys for the answer.

              • 4. Re: Getting process definition XML source from the database.
                nick_nickolov

                In relation to your posts, guys,
                does anybody have an idea how to get a hash from what is deployed in the database on one hand, and what we have locally as a par file on the other hand?
                I want my app to to check at startup whether the par on the filesystem needs to be deployed to the database. Ideally, the hash would include not only processdefinition.xml, but the classfiles too.