8 Replies Latest reply on Jun 18, 2008 5:48 PM by kukeltje

    How to capture the connection line(Starting point,end point)

      I cost huge a lot of time to study how to capture the starting point and end point of connection line between two nodes in jBPM Designer. it turns out I still can't get it. Is there something magic happens inside framework GEF? Or my direction is wrong?

      Can some jBPM designer guru lead me out of this? I really appreciate your help.


      --Michael

        • 1. Re: How to capture the connection line(Starting point,end po
          koen.aers

          Start and enpoints of connections are defined by the AnchorPoint interface in GEF. For the jBPM designer we use the simplest implementation of this which is a ChopboxAnchorPoint. You will most certainly have to look at GEF before you try to play with it.

          Regards,
          Koen

          • 2. Re: How to capture the connection line(Starting point,end po


            Thanks Koen

            I've read your pdf file you presented in eclipsecon 2006, very helpful to me.

            I want to record all info (lines,nodes,..) of "processimage.jpg" in another xml file, in order to be monitoring the processses status when it's in running state using SVG.

            below is a sample :

            <?xml version="1.0" encoding="UTF-8"?>






























































            We currently record this stuff using Picture manupulated program to measure this out. super ineffective.


            Can u give me some ideas on how to work this out. Does info stored in gbd.xml I can use to caculated this out.
            Many thanks!!

            --Michael

            • 3. Re: How to capture the connection line(Starting point,end po

              sorry the sample file didn't show up, let me try again:

              <?xml version="1.0" encoding="UTF-8"?>
              <processdefinition name="weeklyReport">
              
               <transition name="fork1" from="Writing report">
               <point x="180" y="126"></point>
               <point x="210" y="126"></point>
               </transition>
              
               <transition name="Project manager check" from="fork1">
               <point x="210" y="126"></point>
               <point x="241" y="41"></point>
               <point x="265" y="41"></point>
               </transition>
              
               <transition name="Department leader check" from="fork1">
               <point x="210" y="126"></point>
               <point x="238" y="98"></point>
               <point x="265" y="98"></point>
               </transition>
              
               <transition name="CIO check" from="fork1">
               <point x="210" y="126"></point>
               <point x="241" y="167"></point>
               <point x="265" y="167"></point>
               </transition>
              
               <transition name="CEO check" from="fork1">
               <point x="210" y="126"></point>
               <point x="241" y="232"></point>
               <point x="265" y="232"></point>
               </transition>
              
               <transition name="join1" from="Project manager check">
               <point x="408" y="40"></point>
               <point x="444" y="40"></point>
               <point x="474" y="126"></point>
               </transition>
              
               <transition name="join1" from="Department leader check">
               <point x="408" y="102"></point>
               <point x="444" y="102"></point>
               <point x="474" y="126"></point>
               </transition>
              
               <transition name="join1" from="CIO check">
               <point x="408" y="161"></point>
               <point x="446" y="161"></point>
               <point x="474" y="126"></point>
               </transition>
              
               <transition name="join1" from="CEO check">
               <point x="409" y="223"></point>
               <point x="445" y="223"></point>
               <point x="474" y="126"></point>
               </transition>
              
               <transition name="end" from="join1">
               <point x="474" y="126"></point>
               <point x="494" y="126"></point>
               </transition>
              
              </processdefinition>


              • 4. Re: How to capture the connection line(Starting point,end po
                kukeltje

                isn't it easier to write an XSLT with some small java extensions that converts the graphical part of the process to SVG runtime? I'd even help out a little if you guys go in that directions

                • 5. Re: How to capture the connection line(Starting point,end po

                  Many Thanks for your kind help.

                  I've tried that before. But you know the gpd.xml only record the nodes and bendpoints info, But I also want the startpoint and endpoint of the connections to be recorded. any ideas?

                  Regards

                  --Michael

                  • 6. Re: How to capture the connection line(Starting point,end po
                    kukeltje

                    I couldn't realy care about the precise starting point I think. It has to be somewhere on a boundary of the node. Worst case, make it the centre of the node.
                    This might be easy to achieve (but not that beautiful)

                    otoh, maybe you could ask the developers (via a jira issue) to also store the starting point in gpd.xml.

                    Using SVG is imo a much nicer way to display processdefinitions and the progress because an image and an overlay is not needed.

                    • 7. Re: How to capture the connection line(Starting point,end po
                      koen.aers

                      If you want the startpoint and the endpoint of the connection you will have to calculate it... Basic geometry ;-)

                      Regards,
                      Koen

                      • 8. Re: How to capture the connection line(Starting point,end po
                        kukeltje

                        ahh. that is correct. In another post in the forum, somebody described in detail how it should be and can be calculated.

                        ..... minutes later.....

                        http://www.jboss.com/index.html?module=bb&op=viewtopic&t=129274