12 Replies Latest reply on Jan 13, 2014 3:11 AM by cathyhill

    JBPM4 Process Image

    tejjbpm

      Hi all,

      I am using the latest version of JBPM 4.2 API and GPD.

      I dont see my project generating any process image for the jpdl.xml I create. I would like to show the current state of my process and would like to give a link to the image to show the state of execution.


      Can anybody give some pointers please? Have I missed any configuration?

      Thanks in advance

        • 1. Re: JBPM4 Process Image
          sebastian.s

          The image should be generated as soon as you save your process definition file (.jpdl.xml). I have not tried 4.2 yet because I have not found the time. Have you checked if there is a bug reported for the GPD used in 4.2 which explains the behaviour?

          • 2. Re: JBPM4 Process Image
            tejjbpm

            Hi Sebastian

            I did check the JIRA but there does not seem to be any issue raised with this.

            Any other pointers?

            • 3. Re: JBPM4 Process Image
              sebastian.s

              I have to pass. Let's see what the others have to say. Just one more thing comes to my mind:

              I don't know if the GD needs the jBPM runtime to generate the process image. But what's wrong with checking if your jBPM runtime location (Eclipse settings) points to your jBPM-4.2 installation?

              • 4. Re: JBPM4 Process Image
                koen.aers

                The GPD does the generation based on the canvas in Eclipse and nothing else. It does not need the runtime to do this. But what is the exact problem?

                Regards,
                Koen

                • 5. Re: JBPM4 Process Image
                  tejjbpm

                  Thanks for the reply. I dont know what was the initial problem with the setting in eclipse..but now I installed a fresh version of eclipse and did all the setting again - it seems to generate a image now. Dont know what went wrong initially..

                  Can you give me some pointers on how to show the current state of execution. Do I just have to show a link to the image - will the image get updated automatically when the process instance moves forward?

                  Do I just add this line while deploying and the image will be updated automatically?
                  deployment.addResourceFromClasspath("workflow/taskform/process.png");


                  Thanks in advance

                  • 6. Re: JBPM4 Process Image
                    koen.aers

                    I have no idea how Heiko implemented it in the current console. I would advise to look at the code.
                    Back in jBPM 3 we used a hack with 3x3 html table witoverlaying the image. The middle cell of this image had a red border and used the coordinates of the current node in the process.

                    Cheers,
                    Koen

                    • 7. Re: JBPM4 Process Image
                      sebastian.s

                      Hello TejJBPM,

                      1.) if you want to show a process image in the jBPM-console you have to deploy the image as well because it is not generated by the jBPM runtime.

                      2.) the jBPM-console shows the current state of the process. The console uses the deployed image and puts an arrow (DHTML etc.) on the process image at the appropiate position. The co-ordinates for this are determined via the API and the information originates from the process definition file (g="").

                      So if you want to show the status in your own application you have to do some image manipulation or do it in a similar way as the console does. It is not that hard. Search for thread in which I was asking certain questions about this.

                      • 8. Re: JBPM4 Process Image
                        tejjbpm

                        Hi Sebastian

                        I deployed the process image along with the jpdl file. I saw that I can view it in jbpm console but I want to use that as part of my web application. From ur explanation I understood that I have to do some DHTML stuff to get it to work as it is JBPM runtime does not do it for us. (This is something i could not find in the user guide - thanks for your reply and insight)
                        I will manipulate the image using some html stuff to achieve what i want.

                        • 9. Re: JBPM4 Process Image
                          sebastian.s

                          You can use DHTML and overlaying stuff. But you don't have to. I personally used some Java image manipulation code. In each case all you need is obtainable via the API.

                          1.) You can get the process image.
                          2.) You can retrieve the active activities' names.
                          3.) For each activity you can retrieve the co-ordintes of its position in the process image.

                          For this take a look at the API-documentation and there might be some good hints given by other users of the forum in the thread I mentioned before.

                          I went for the solution to draw an additional coloured rectangle around the active activities since I haven't had much Java image manipulation experience. Worked for me. But if you are happy with DHTML stuff go for it and take a closer look at how the Console handles this.

                          • 10. Re: JBPM4 Process Image
                            tejjbpm

                            That does sound like a plan :). I would like to avoid DHTML if possible as I am used to working around java.

                            I think it is one possible and viable solution for me.
                            Thanks again.

                            • 11. Re: JBPM4 Process Image
                              fbimage

                              when you save the processing image,  it will generate images . i'd perfer use c# image manipulation codes to processe image and do some other activities.

                              • 12. Re: JBPM4 Process Image
                                cathyhill

                                Hey Tej, do not forget to mark it as a verified solution if it is solved your image processing issue. Thank you.