3 Replies Latest reply on Sep 10, 2008 1:40 PM by kukeltje

    API questions: how to...

      Hi,

      I have some questions about JBPM/JPDL Api (maybe a minimal part question of a very long future list of questions... sorry)
      I'm rewriting a task "to do list"... like the jbpm-console.
      Why ?
      1) Because jbpm-console doesn't manager authorizations (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=141654)
      2) Because I want a standard user interface between my ERP and WorkFlow system
      ....

      about point 2):
      2.a) how can I get a task/process instance image rappresentation ?
      I know I can get the jpg image of the process definition using

      ProcessDefinition vPD = vJbpmContext.getGraphSession().loadProcessDefinition(aProcessDefinition);
      vBytes = vPD.getFileDefinition().getBytes("processimage.jpg");

      and there is a very good example for process instance at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=102817
      (thank you very much Mr. dleerob). But.. there is a more simple way ? like the getBytes("processoimage.jsp" ... directly from standard jpdl api?
      Will be implements in a future release?


      2.b) I can define variables. It is possible to define 3 properties : "required", "read", "write"
      What's about nature of the field ? e.g. a list of value or if it is a number (and maybe the precision) or is a string, a date and so on?
      If it is possible to define this additional properties... how can I get it from jpdl api?

      I'm try also to get a look to java source code of the jbmp-console, but it is not so simple to found all response

      thank you to all.
      Bye
      Roberto

        • 1. Re: API questions: how to...
          kukeltje

          2a: By using the component that is used in the console as wel, or develop your own component

          But.. there is a more simple way ? like the getBytes("processoimage.jsp" ... directly from standard jpdl api?
          No

          Will be implements in a future release?
          It is not on the list, but that does not mean it will not happen.

          If it is possible to define this additional properties... how can I get it from jpdl api?

          You can by turning of schemavalidation (removing the declaration) or adding it to elements that support anyType (see the xsd for that)

          You can then load the processdefinition.xml file the same way you load the image and make a dom out of it. After that you can retrieve the elements


          • 2. Re: API questions: how to...

            Thank you
            do you know the name / java source name of that component (to get the task/process instance image) ?

            for 2.b) so the standard jdpl designer doen't support it directly?

            • 3. Re: API questions: how to...
              kukeltje

              like you described above for the image

              2b: No