The way processes have to be deployed now, does not realy fit our procedures and the way we use processes. Let me explain.
A process with the versioned classes and taskforms is part of a bigger web application. Most of this is not versioned in the way jBPM processes are. So most of the webapplication is in a war file:
- other pages
- resource files
- roles (in web.xml)
and in a separate file the process info.
Now if I look at the structure the process eclipse is getting, it's looking more and more like a war file
/WEB-INF/web.xml /META-INF/ /WEB-INF/lib/... /WEB-INF/classes/OwnClass.class /myPage.html
/processdefinition.xml /classes/my/OwnClass.class /form1.xhtml
There was a discussion on versioning and there is an issue in jira on using the context classloader in jBPM
What I'm thinking about is is putting all the relevant information in a war file and generating a hash of all these files and this into a total hash
In the warfile is a reference to a deployservlet (so this should be in EACH web.xml in EACH war file), which takes this total hash and compares it with a stored hash, if it differs the new process is deployed, in combination with all classes, forms etc...
The challenge is to give each war file a unique context. So each version of the process get's it's unique url, but in such a way that the jbpm engine can determine what it should be. This is needed for having the web-console still work (otoh, should it? Wasn't it meant for RAD? not full APPS?) The unique urls could either be done by deploying as an ear, where you can have files (application.xml) which define the context of war files in it, or a unique name for the war file. Using the hash for this would be a nice solution.
There are lots of other advantages to this (imo) e.g. an expanded deployment where the form files are not read from the db, but from the war structure. Just changing one .xhtml file and not 'deploy' the new process (since just a page changed) would make it instantly available and reduces the times deployment is needed by a huge amount.
Maybe there are other advantages and even disadvantages. So please lets discuss those here. These were just my initial thoughts.