-
1. Re: JPDL feature request
rebody Apr 7, 2010 6:43 AM (in response to jump)Hi Alexei,
The schema of jPDL is included by the jBPM distribution file. You could get it from the http://sourceforge.net/projects/jbpm/files/。
As you can see in the .jpdl.xml, the latest version is 4.3, so you can find out there is a file named jpdl-4.3.xsd in the src directory.
The distribution file includes a Graphical Process Designer, it is a eclipse plugin, you could use it to design jPDL process definitions. You could find more information in the User Guide. http://docs.jboss.com/jbpm/v4/userguide/html_single/#graphicalprocessdesigner
In my opinion, the season why jPDL didn't seperate the g="1,2,3,4" to x="1" y="1" w="1" h="1" is the transition could have more than one point in the g attribute, but I don't very clearly for that, maybe someone else could give us the reason for this.
-
2. Re: JPDL feature request
jump Apr 7, 2010 6:57 AM (in response to rebody)Thx for your attention. Well, lets look a little bit wider: what do you think about idea to generate svg process images directly from jpdl by means of xslt without eclipse gpd editor? Even look farther ahead: we can add to jpdl file something like
<?xml-stylesheet type="text/xsl" href="../toSvg.xsl"?>
to make jpdl viewable without jpdl editor
-
3. Re: JPDL feature request
rebody Apr 7, 2010 7:21 AM (in response to jump)Hi Alexei,
I am not good at xslt, so in our project, we use java to generate the PNG image from .jpdl.xml.
About the jpdl editor, we have developed a web-based jPDL designer. Likely the jBPM modeller, we using VML/SVG to draw process graphical in the brower.
-
4. Re: JPDL feature request
jump Apr 8, 2010 6:42 AM (in response to rebody)I guess, my xslt is even worse then yours
I attached xslt to this post. You should download it and then add XSL processing instruction
<?xml-stylesheet type="text/xsl" href="toSvg.xslt"?>
to your jpdl file.
Then your need view your jpdl file with any svg enabled browser i.e. firefox
Yep, it's still ugly but it's fully client-side image generation, i.e. you need no process image png or jpg anymore
I'm still working and gonna make it a little bit nicer & integrate it to my REST interface for JBPM
-
toSvg.xslt.zip 1.3 KB
-
-
5. Re: JPDL feature request
jump Apr 8, 2010 9:25 AM (in response to rebody)By the way, I've just discovered that svg supports events & scripting . So you can get really rich client-side process preview.
-
6. Re: JPDL feature request
koen.aers Apr 8, 2010 9:42 AM (in response to jump)This is a very interesting discussion guys! I like the svg approach of rendering the image, it is a lot cleaner than saving the image with the process. What about the performance though? Do you perform this xslt transformation to svg on the fly each time before rendering? Doesn't that take a lot of time?
As for the 'g' attribute, this looks like it does because it has always been our focus to keep the jpdl xml concise and readable. As you might know the graphical info even used to be in another file in jBPM 3, with other drawbacks. Even if it would be advisable, it would be very difficult to split the 'g' attribute at this time because of backward compatibility issues and complications with the tools. We will be moving towards BPMN2 anyway for the next generation of jBPM (jBPM 5) and that standard is focused on diagrams and interchange of them.
In the meantime, feel free to continue to suggest and contribute jBPM 4 improvements.
Cheers,
Koen
-
7. Re: JPDL feature request
jump Apr 8, 2010 10:13 AM (in response to koen.aers)Well, actually I was playing with a simple process definition consisting of 3 states and 2 transitions and my firefox was really fast. However, if I will get slowdown, I'll try to move transformation to server side.
P.S. I hope firefox xslt 2.0 support will appear soon, then there will be no difference if g separated or not
-
8. Re: JPDL feature request
rebody Apr 8, 2010 8:24 PM (in response to jump)Hi Alexei,
Actually, I like SVG very much. But Sadly the IE does not support SVG, so it let SVG useless in my job. Hoping sometime IE could provide native SVG, then we could use SVG to draw graphical on every browsers.
-
9. Re: JPDL feature request
jump Apr 9, 2010 5:44 AM (in response to rebody)Actually it does not support SVG natively, but there are several plugins http://en.wikipedia.org/wiki/Scalable_Vector_Graphics#SVG_and_Microsoft_Internet_Explorer
-
10. Re: JPDL feature request
jump Apr 9, 2010 11:17 AM (in response to jump)Can anybody clear how g attribute relates to actual location & dimentions of visual block? If i'm not mistaken, first 2 numbers describe x & y coordinates of upper left conner for state blocks and circle's center for end & start blocks.
-
11. Re: JPDL feature request
jump Apr 9, 2010 1:06 PM (in response to jump)Just a small update, if anybody care
Currently supported tags
<svg:g> <xsl:apply-templates select="//jpdl:transition"/> <xsl:apply-templates select="jpdl:start"/> <xsl:apply-templates select="jpdl:end"/> <xsl:apply-templates select="jpdl:state"/> <xsl:apply-templates select="jpdl:hql"/> <xsl:apply-templates select="jpdl:decision"/> <xsl:apply-templates select="jpdl:join"/> <xsl:apply-templates select="jpdl:fork"/> </svg:g>
Still a lot of work with transitions. Works fast at least under firefox.
And 2 screenshots: from Eclipse & from Firefox
-
Mozilla Firefox.png 62.1 KB
-
toSvg.xslt.zip 1.8 KB
-
-
12. Re: JPDL feature request
rebody Apr 9, 2010 9:03 PM (in response to jump)Hi Alexei,
The attribute g is 'x,y,width,height', the x part is equals as left, the y part is equals as top. There is no difference between start/end(with image) and other(without image) activities.
-
13. Re: JPDL feature request
sebastian.s Apr 10, 2010 2:40 AM (in response to koen.aers)I'm not really happy either with the way the coordinates are stored in the xml-file. One approach to change the process definition from using the g-attribute to single attributes for each coordinate while maintaining backwards-compatibility would be to add these attributes while keeping the g-attribute. Maybe just for a certain time to allow proper migration. Of course this means redundancy. We could define the g-attribute being the relevant one in case there is in inconsistent process definition in which coordinates differ.
Just my 2 cents.
-
14. Re: JPDL feature request
jump Apr 13, 2010 12:11 PM (in response to jump)update
<svg:g> <xsl:apply-templates select="//jpdl:transition"/> <xsl:apply-templates select="jpdl:start"/> <xsl:apply-templates select="jpdl:end"/> <xsl:apply-templates select="jpdl:end-cancel"/> <xsl:apply-templates select="jpdl:end-error"/> <xsl:apply-templates select="jpdl:state"/> <xsl:apply-templates select="jpdl:hql"/> <xsl:apply-templates select="jpdl:sub-process"/> <xsl:apply-templates select="jpdl:decision"/> <xsl:apply-templates select="jpdl:join"/> <xsl:apply-templates select="jpdl:rule"/> <xsl:apply-templates select="jpdl:fork"/> </svg:g>
-
Mozilla Firefox.png 106.7 KB
-
toSvg.xslt.zip 1.9 KB
-