3 Replies Latest reply on Apr 10, 2006 12:44 PM by kukeltje

    persisting process description into xml format

      Hi all,
      I am a novice to jbpm so this might be a silly question.
      Is there any way to "persist" process description into xml format (or any other human readable format)? I use persist in quotes cause I'm not gonna use this for actual persistence but rather for debugging purposes.
      Thanks,
      kv.

        • 1. Re: persisting process description into xml format
          kukeltje

          it is persisted in the database in objects AND in xml format. I do not know the command to retrieve it, but look at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76164 Alex talks about custom files there, but afaik it is true for processdefinition.xml as wel

          Ronald

          • 2. Re: persisting process description into xml format
            koen.aers

            From the class FileArchiveParser :

            public ProcessDefinition readFromArchive(ProcessArchive processArchive, ProcessDefinition processDefinition) {
             FileDefinition fileDefinition = (FileDefinition) processDefinition.getDefinition(FileDefinition.class);
             Map entries = processArchive.getEntries();
             Iterator iter = entries.keySet().iterator();
             while (iter.hasNext()) {
             String entryName = (String) iter.next();
             if (! "processdefinition.xml".equals(entryName)) {
             if (fileDefinition == null) {
             fileDefinition = new FileDefinition();
             processDefinition.addDefinition(fileDefinition);
             }
             byte[] entry = (byte[]) entries.get(entryName);
             if(entry != null) {
             fileDefinition.addFile(entryName, entry);
             }
            
             }
             }
             return processDefinition;
             }
            

            So I am afraid the processdefinition.xml is not in the database... You could nevertheless add your file parser that does this job.

            Regards,
            Koen

            • 3. Re: persisting process description into xml format
              kukeltje

              hmm... I was sure Tom mentioned somewhere that adding if you turn off process validation, you could add custom xml to the pd.xml and read the pd runtime and get your custom xml from it.

              And then I remembered. It was in Jira

              http://jira.jboss.org/jira/browse/JBPM-581
              http://jira.jboss.org/jira/browse/JBPM-617

              unfortunately it is not in 3.1 but will be in 3.1.1 and 3.2

              Ronald