3 Replies Latest reply on Dec 23, 2008 4:38 AM by pieter.martin

    Process image upload

      Hi all,
      i make an upload process by personal code to jbpm-console servlet. This process is ok for me. But I need also to upload the process image to the same location, i suppose, because the console show me an error when I try to visualize the tasks diagram.

      How can I proceede to solve this issue?
      Any suggestion are accepted.

        • 1. Re: Process image upload
          pieter.martin

          Hi,

          I our app we include the picture in the par file deploy it and then later extract it again.

          Relevant code:

          graphSession.deployProcessDefinition(ProcessDefinition.parseParZipInputStream(new ZipInputStream(new ByteArrayInputStream(parFile))));
          


          Criteria query = ManagedJbpmContext.instance().getSession().createCriteria(ProcessDefinition.class);
          List<ProcessDefinition> anarchyProcessDefinitionList = query.list();
          for (ProcessDefinition process : anarchyProcessDefinitionList) {
           if (process.getName().equals(processInstance.getProcessDefinition().getName())) {
           FileDefinition fileDefinition = process.getFileDefinition();
           dribbleSvg = fileDefinition.getInputStream("processimage.svg");
           break;
           }
          }
          


          Cheers
          Pieter


          • 2. Re: Process image upload
            kukeltje

            svg?

            • 3. Re: Process image upload
              pieter.martin

              Hi,

              Yes svg.

              We generate a svg picture from the eclipse processdefinition.xml and gpd.xml.
              This allows us to runtime change the colour of the tasks to indicate their respective statuses.

              This gives a nice visual indication to the user of the process.

              Cheers
              Pieter