Posted by: planetjbpm | 7 January, 2011

Last post

It has been over a year now since I posted here.  Any of you who have been following development of opensource bpm solutions and jBPM in particular might have a clue about why it took so long (at least partially). Not that long ago, I made the ‘formal’ decision to not use jBPM anymore. It has to do with a new job, things within the project and alternative solutions.

A new blog will arise somewhere with a broader scope, new and certainly more articles (not only tech based) which I’m sure anyone interested will be able to find.

It has been a fun couple of years and the years ahead will most likely be as fun, maybe even better.

Cheers,

Ronald

Posted by: kukeltje | 5 December, 2009

jBPM goes BPMN

Not sure if it is a giant leap or ‘just’ a big step. One thing is sure, it certainly is no small step.  Joram Barrez introduces the BPMN2 roadmap of jBPM. Take a look, even I was impressed with the work that is already done  😉 jBPM 4.3 targeted for a january first release will be a great beginning of 2010.

Posted by: kukeltje | 16 November, 2009

jBPM 3 annotations

Everybody using seam probably knows about the fact that Seam provides access to process instances, tasks and a (kind of) process context via annotations. But the seam process context does not always play nice with the plain jbpm context.

Read More…

Posted by: kukeltje | 16 September, 2009

Most intriguing question is answered

For one reason or another, I enjoy helping others making progress. Whether that is helping them getting unstuck when they are up to their neck in quicksand, finding the right direction when they face the wrong one or becoming more knowledgable when they already are smart, it does not matter.

For those who know, I’m ofcourse talking about my ‘work’ in the jBPM forums, mainly the user-forum. In there I get an occasional compliment from users (and besides that many from the team) and just every now and then a negative remark from people who are (most of the time) not only jBPM newbies, but sometimes even total (java?) newbies and the ones that ‘complained’ probably did not get the help they wanted.

Just like with most (F)OSS projects there are things you do not know, like who your users are, how often it is used etc. These things all come with the ‘job’ and are certainly not what keeps me awake at night. And just like in any other project you have users who do not read sticky topics on how to post, think that we all know what they know, we have an infinite amount of time etc. Although having seen very different ways of thinking/reasoning by many, I more and more can make a guestimate (would not call it clairvoyant yet). And if you follow forums very close, you can see that all items addressed in one of the better ‘support documents‘ come by more often then I’d like. The question why they behave the way they do is also not what I’d like to know most. Some people learn  when I try to educate them, others don’t. Luckily I can focus on the former ones, so it does not bother me to much.

No, the most intriguing question I’d like to know is something that is not visible in the forums because of what I think is a bug.

firstPostAs you can see, my number of posts  is …. “kukeltje”. Does not look completely right does it. Every now and then it  triggers my curiosity how many posts did I make.  A certain post in the forum and me handling it and pinging the core devs and their reply triggered it again:

Tom Baeyens wrote:

> Joram Barrez wrote:
> Thanks for the excellent handling in the forum, Ronald!

+9432523463 (ronald’s approx amount of posts)

I had no idea how far Tom was of, 10%, 15%, 42%? So I informally inquired if it was possible for someone within JBoss IT to do a manual query. Tom, very aware of the importance of the community and ‘politicallly aware and growing ;-)’ , pulled some strings (thanks Mark, Libor) and an answer came out at a moment that the question was still known (Deep Thought was not needed)

Well, how much of was he?  131372193.0779945% to be ‘precise’.  In 4 years it turned out I made 7180 posts. Personally I hoped it was around the 10.000, so I admit that the initial number was a disappointment. Luckily, Tom did some preliminary calculations:

So 7180 / 4 years * 356 days/year is almost 5 posts a day, including holidays and weekends ! (me: it’s 365 Tom ;-))

Ronald, congrats.  It deserves a statue !

regards, tom.

Hmmm… not bad if you look at it this way. If you just take my average number of 200 working days into account, you get close to 9 posts a day. My personal impression is that it takes me around 1 hour per day, so that is an average of 6.67 minute per post. Well, believe me, the standard-deviation is huge… Heck, it is not even a normal distribution (I think).

Now the answer to the most intriguing question is known, let me show you some other numbers, derived from this one (I know the guestimate of 2 posts per topic used further on is not fully legit, since the last 2 years I replied more than before)

  • 200 days, 1 hour/day  over 4 years is 800 hours, 2/3 of a normal working year.
  • 800 hours,  €105 per hour excluding v.a.t (19% in the Netherlands) is €100.000 (including v.a.t.)
  • On average that is €13.92 per post. With a ‘guestimate’ of an average of 2 posts per topic, that is over €40 per ‘support call’. Keep that in mind you all 😉
  • With 720 ‘pages’ in the jBPM user forum and 10 topics per page, you have 7200 topics. With the same average of 2 posts per topic, it means that I reply to 1 out of 2 topics.

Tom takes very well care of the volunteers in the jBPM community and I know he’d even like to do more. May I suggest to Red Hat/JBoss management, as I already did to Tom,  that in the Netherlands volunteers are allowed to receive around €1500 tax free per year 😉

See you all in the forum

It’s official now… if you want to see really advanced usage of web x.0 is, you should take a look at the demo Joram Barrez made of a web based jBPM 4 (jPDL) designer with a bpmn look.  He Initially mentioned it one month ago, a lot of work went on in between which resulted in a usable demo now.

Can’t wait for more (BPMN2 anyone?)

Posted by: planetjbpm | 5 July, 2009

JPDL xml extensibility

As many of you might know, jBPM is extensible in many ways. You can

  • in the most low level form use the pvm to develop your own processlanguage.
  • extend nodes by overriding the implementations and adapt hibernate mappings
  • create custom taskcontrollers
  • Implement node behviour by putting a class reference on the ‘node’ element
  • implement delegation classes like actionhandlers and assignmenthandlers

What many of you probably do not know is that the processdefinition.xm file besides being parsed is just stored in the database as well and it is very easy to retrieve

ProcessDefinition processDefinition = jBPMContext.getProcessInstance(pid).getProcessDefinition();
FileDefinition fileDefinition = processDefinition.getFileDefinition();
InputStream inputStream = fileDefinition.getInputStream("processdefinition.xml");

Converting this to xml would be the next step so you can have real access to it (XmlUtil being a jbpm class)

Document document = XmlUtil.parseXmlInputStream(inputStream);
Element documentElement = document.getDocumentElement();

Now what could you do with this? Well with access to each element via DOM or XPath, a lot. First of all, the jBPM3 console uses this same concept to read the forms.xml file that contains the mapping from tasknames to form files and reads the xhtml form files from the database this way. It would e.g. not be difficult to change this to use a form attribute on a task element instead of using the forms.xml file

<start-state name="Create new web sale order" >
<task swimlane="buyer" form="form.create.xhtml"/>
<transition to="Evaluate web order" />
</start-state>

This is comparable to what jBPM4 will use. You would not gain much doing this in jBPM 3 since you’d have to do this manually in the gpd.
What else? Well, some of you might remember that jBPM 3.0 it was I believe had the option to automagically generate the forms based on the variables that were present in the task.


<start-state name="Create new web sale order">
<task swimlane="buyer">
<controller>
<variable name="item" mapped-name="Item" access="read,write" />
<variable name="quantity" mapped-name="Quantity" access="read,write" />
<variable name="address" mapped-name="Address" access="read,write" />
</controller>
</task>
<transition to="Evaluate web order" />
</start-state>

Would have generated a form. But *not* like the one in the jBPM 3.2 websale example. The major difference being that the custom form in the example contains code to specify that the quantity input should be an integer

<h:inputText value="#{var['quantity']}" converter="javax.faces.Integer" converterMessage="The quantity must be numeric." validatorMessage="The quantity must be at least 1.">
<f:validateLongRange minimum="1"/>
</h:inputText>

Both solutions have advantages but also the disadvantage that it did not support the functionality of the other and both could not take the type into account (since it could not be specified at all) making every input a string . The design-time generated forms at least let you adapt those manually. Loosing those changes when a variable was added and the form regenerated. Now you know jBPM is extensible in the xml definition, putting a type on the variable would have been an option without changing the persistence class of the variable instance. Creating a template with conditional rendering, a custom jsf var list bean and some small other changes, would have given you the automagically generated form which does take the type into account:

<jbpm:dataform>

<f:facet name="header">
<h:outputText value="#{taskName}"/>
</f:facet>

<!-- TASKFORM ROWS -->
<c:forEach items="#{vars}" var="var">

<jbpm:datacell>

<f:facet name="header">
<h:outputText value="#{var.name}"/>
</f:facet>

<h:inputText value="#{var.value}" rendered="#{var.type == 'String'}"/>
<h:inputText value="#{var.value}" rendered="#{var.type == 'Integer'}" converter="javax.faces.Integer" converterMessage="Must be numeric."
</h:inputText>
<rich:calendar value="#{var.value}" rendered="#{var.type == 'Date'}"/>


</jbpm:datacell>

</c:forEach>

</jbpm:dataform>

This is just one example. You could also have changed the composite access attribute to the more logical separate ‘readOnly’ and ‘required’ attribute (the write only never made real sense to me in real life) and if you continue, why not put validation patterns in there, error messages, and what more. In the end you could almost as well have put the .xhtml form fragement in there as a nested element (you could… I’m not kidding).

Personally, I never went this way, not even putting in just the type in the variable definition. Then why this post you might ask. Well, I just wanted to describe the  concept of this extensibility and I did use it but in a completely different way. More on this in a later post

Posted by: kukeltje | 3 July, 2009

jBPM 3 seam/jsf/richfaces based console

A few months ago, development on the new console for jBPM started.  Initially, it was the intention that this console could also serve as the next console for jBPM 3 with the jBPM 3.3 branche initially being the target. Not much later, it was decided to only develop this console for jBPM 4 and the jBPM 3.3 branch was discontinued and 3.2 was the main stable branche again.

Personally I thought it was a pity that jBPM 3.x did not get a new and shiny (web 2.0?, whatever that may be) console. Fortunately the new console is opensource and therefore I think that just ‘complaining’ is no valid reaction and that I could/should work a little sweat by doing it myself.

Well… no, I didn’t… mainly for one reason. Time… Since that is limited and the frameworks that I use in my day job, Seam, JSF/Facelets and Richfaces are not aligned with how the new console is being implemented (GWT, no seam), so I choose not to do. Until two weeks ago.

A customer told me they got some internal requests for a more advanced ui for an application. What they wanted was not something I did before, so I needed to experiment a little. My experiments turned out to be fruitful, so I decided to put some time in it and try to create a new console. Yes, besides the time I spend in the jBPM forum, on the tenniscourt, golfcourse, and on my Yamaha YZF600R, there is still some time left, being in between girlfriends helps)

Still, I choose not to do it in GWT, but neither did I try to use the existing console. Why a new console you might ask and not extend the one already there since it is JSF based? The main reason was that it is based on Gravel (http://www.jboss.org/gravel/) . Something that predates Seam and Richfaces/Ajax4JSF but in a way tries to accomplish the same. If you visit the project page and click some links, especially doc related links, you know why I did not want to put much effort in it. Not that it is badly designed or anything, I just don’t think it will stand the test of time. And besides, I did reuse some of the code behind the current console though, so not all was lost.

But before I’ll present you the first screencast of this jBPM 3.x console, let me summarize what it provides:

  • Many of the same things the current jBPM 3.x console (duh, you would say, but let me tell you that ‘porting’ his took just 3 days)
  • A look that is comparable with the jBPM 4 console
  • The ability to open multiple tabs (not browsertabs, but in the application) for almost anything, including the ability to work on multiple tasks at the same time
  • Context menu support for actions on almost anything
  • Doubleclick functionality to open items (e.g. tasks)
  • Based on JSF/Facelets/Richfaces/Seam
  • Advanced UI components from Richfaces, so no fully custom things anymore
  • Seam components for accessing tasklists, etc, comparable to the ones that by default in Seam, but more suitable for paging, filtering etc.

jBPM Console

(Thanks to Joram for putting this screencast on his site since wordpress does not allow embedding flash)

But before everybody starts cheering, let me also state what it is not:

  • It is not the official replacement of the jBPM 3 console. Not that I would mind if it became that, but since jBPM 3 is in ‘maintanance mode’ when 4 will officially be out, not much official effort will be put in jBPM 3.
  • It is not fully seam based in the way that it does not use the entitymanager (@JbpmContext is not used, https://jira.jboss.org/jira/browse/JBPM-1770)
  • It is not a competitor for the jBPM 4 console, although it would be very simple to make it usable for 4.0
  • The source is not free/open yet mainly because I need a repository and for it and it needs some cleaning up since I focussed on functionality (stupid me ;-))
Posted by: kukeltje | 12 June, 2009

jBPM and portals

I was pleasantly surprised when I saw the announcement that  very happy with JBoss Portal and the eXo Portal becomming one project, two of the better FOSS portals joining forces… wow… JBoss Portal, to noones surprise already uses jBPM for workflow, but eXo in one of their modules does as well. Giving the user the choice of jBPM or Bonita. Both, in their latest releases (jbpm 4 will be out soon), having the PVM,  as a a basis. The latter, as you might know (but certainly do now), was developed with years of experience in field of workflow/bpm/… Great to see that great projects choose to to use great projects to become even greater (or am I exaggerating now ;-))

Posted by: kukeltje | 25 February, 2009

XForms editor with JBoss VPE (and some jBPM)

For several years now, I’ve been using XForms in some projects. One of the main resons was that I can declarativly design my form. Some might say that XForms is not supported in browsers. Correct, but there are several solutions that run serverside or lately in a kind of hybrid mode (hate the term AJAX since I dislike the footballclub with the same name) My preference has always been Chiba, although others exist. Recently I started working on combining some of the more interesting frameworks and standards into something that could support ‘message’ oriented b2b communication. It should not matter if a message comes in from e.g. a ebMS system, or from a webinterface. In all cases the the message that is needed is xml. So what is easier to use a technology where you have an xsd, translate that to XForm and use that form to runtime produce xml messages that comply with the xsd (and more). Right?

Well, yes and no. Many of the forms generated from the xsd need some form of change. Luckily the binding of an input element to a specific element (or nodeset) in the xml instance is loosely coupled. You can place an input anywhere in a form and still have it mapped to the same element in the xml instance. No 1:1 mapping is needed. Cool if you want to have elements in your form grouped differently then they are in the xml instance. If you are really into the details of XForms it is possible to do this by hand as it is xml, but mistakes are easily made. So the first thing to do is to look for existing editors. There are a couple which I investigated (I hate reinventing the wheel) mentioned in the order of when I knew they existed.

  • IBM (Eclipse based)
  • OpenOffice
  • Orbeon (browser based)
  • Oryx (browser based)

All have their specific advantages or disadvantages. But none of them appealed to me. Why not? Well, IBM (on alphaworks) is not maintained anymore, OpenOffice XForms editing is not intuitive (to me), Orbeon is closely related to their forms format and so cannot be easily used with Chiba (and no I’m not going to change away from that), plus that it is written in XForms and not easily extendible ). That it is written in XForms is by itself a great compliment for those guys, eat your own doogfood… but to complex for me. Oryx uses SVG a lot, translating xforms elements to svg things. Also not realy extendible by me. In addition to this comes the disadvantage that neither of them is a full fleged xhtml editor which XForms leverages. So…..

I suddenly remembered the docbook example Trying it failed in more than one way, but the source of the JSF and Richfaces VPE templates/editors is also available and those combine xhtml with rendering custom components. XForms is to a large extend the same, so going with these as a basis proved to be a great kickstart for what I wanted. Without going into the details of what is done and what is not, I’ll show three screenshots and the Chiba original

This was what it looked like initially

Opening an XForm in the plain JBoss html editor

Opening an XForm in the plain JBoss html editor

Now with the XForms plugin

XForms 'aware' JBoss html editor

XForms 'aware' JBoss html editor

The preview

The preview in the xforms aware editor

The preview in the xforms aware editor

And what it should look like in Chiba

The select1 screenshot from Chiba

The select1 screenshot from Chiba

Yes, there are still some differences, the ‘popup’ with the 4 checkboxes are ‘dojo’ popups. Not sure how and if I’m going to render those. The required ‘star’ and the help (i) are just some css things I need to do, but don’t tell me I’m not getting close…

Next thing is getting XForms into jBPM (and this editor ofcourse(both shameless plugs 🙂 )) and finding a proper location for development (Max Andersen already proposed a JBoss Tools sandbox, sounds interesting)

Oh.. for anyone interested in trying (MD5: D2B3DBF36FBC0CAA29FA94C67192A2CE)


Edit: I exceeded the download limit (10) on rapidshare. I did not expect that. A new version will be uploaded in a few hours with a higher limit. Sourcecode will also be available shortly, working on that with JBoss

Edit 2: New version on  new download location

Posted by: kukeltje | 17 December, 2008

jBPM “supported” target databases… H2 anyone?

It’s not a well kept secret that jBPM runs on many databases (it uses hibernate), although one ‘competitor’ still states on its website that it only supports one… duh. Since a few months this is being ‘professionalized’ further by making sure a full QA environment is being setup to actually test as many databases as possible. This of course takes time, but with the help of two new additions to the team, things are coming along nicely. The officially supported databases can be found at the ‘jBPM Supported Target Databases’ page in the wiki. Some might be surprised that Oracle is not in there yet, as was a poster with some fork-join problems with Oracle In one of his posts he states:

It struck me that jBPM is not tested properly with one of the most widely used databases in the world.
We also ran into some other problems with the jBPM console and hot process deployment from eclipse when running on a oracle database.
We can’t start process instances from the console and hot deployment is not possible when using oracle.

I would think that the oracle and mssql database should be the top priority databases to test against!.

Fair? hmmm… yes and no. That is why I put “supported” in quotes.  According to the wiki pages it is not officially supported. The meaning of this table is that jBPM has run a required set of tests against that database. Some tests might be excluded (see the wiki or the pom files in the project).  It does not mean there is no knowledge about these databases within the jBPM team. JBoss employees (I have to mention Martin Putz here whom I never met yet) or the community. Within 3 hours, the free support on Oracle via the community made clear that the ‘other problems’  were caused by a human error. The Oracle sequences were not in the jBPM database because two applications had different hibernate configs but pointed to the same database. One with create-drop (a seam (-gen test?) app) and one with none (jBPM).

It turned out his problem with the fork-join could be caused by a regression that might have been caught if the QA environment had Oracle in it. Or does it… The usecase he has is maybe not that common. Some of the legs of a fork go to a decisionnode which has one of it’s outcomes go directly to the join, so no persistent state in between. There is no testcase for this in the testsuite so it would not have been caught directly, but it might have showed up in a different test.  As you can see in his initial post, all effort is being made to tackle this problem. Tesiting with different versions of jBPM against different databases by more than one person and the original poster helping out, not sitting back. Tell me, did anyone ever did get this type of support from other ‘vendors’?

This brings me to one of the other statements made by the poster

When running hsqldb these things work ok.

Lately the jBPM team more and more runs into limitations of HSQLDB. For me, I’d not try to find causes for errors on this database since it is clearly not ‘enterprisy’. For a long time, originally intiated by a post in the ESB forum I’ve had the itch to ditch HSQLDB. This never lead to anything, but for me this was the moment to do it…. And sometimes you are lucky, wish you had done it earlier: It took me only two hours to make H2, the best alternative to me, part of my jBPM project. Well, not completely, the enterprise part was not tested yet, but that is just a matter of some more time.

Now I could run the unit test that I made for the problem above run against 3 databases locally. HSQLDB, H2 and MySQL. All tests (except the excluded ones for HSQLDB) run fine… even against H2… isn’t that great…One small thing I had to do is adapt the connect string a little to

jdbc:h2:~/jbpm;MVCC=TRUE;

Otherwise one multithreaded jobexecutor test would create deadlocks. I recognized the param from an ESB config I came across while searching the web. If it is good for them, it is good for us to.

But… and now comes the big surprise. H2 can run in a compatibility mode. Not SQL-92, SQL-99, SQL-2003 stuff, no Oracle, PostgreSQL, MySQL, MSSQL, Derby, HSQLDB. Yeah right… Well, I gave it a try… changed the dialect to Oracle and added the right mode in the connect string and ran the test. To my big surprise I was able to duplicate the results Martin had on Oracle and PostgreSQL,  wow… The results on MySQL were a little different, but it might be that I should use a different dialect then the InnoDB one… well… since I have a real MySQL, that is of less interest to me.

So for me, the fact that H2 also can be embedded even in-memory, has a much nicer web ui than HSQLDB and just feels better, would be a reason to add it to jBPM and even to the supported target databases (it’s not even on the list, but it is a wiki page so I can at least add it without the ‘check marks’ )

That leaves me with just one statement from the original poster

Is raises the question whether jBPM is the right choice for enterprise software??

Ok, I’m biased, have some inside information to where jBPM all runs, but do not get paid by jBPM to state this: The answer is definately yes and even more so if you look at support as more than a checkmark in a table (and don’t make any more stupid mistakes Jan or rush to conclusions ;-))

Older Posts »

Categories