2013/01/04

jBPM web designer runs on VFS

As part of efforts for jBPM and Drools version 6.0 web designer is going through quite few enhancements too. One of the major features is to provide flexible mechanism to persist modeled processes (and other assets that relate to them such as forms, process image, etc) a.k.a assets even without being embedded in Drools Guvnor.
So let's start with the main part here - what does it mean flexible mechanism to persists assets? To answers this let's look at what is currently (jBPM 5.x) available:

  • designer by default runs in embedded mode inside Drools Guvnor
  • designer stores all assets inside Drools Guvnor JCR repository
  • designer can run in standalone mode but only as modeling tool without capabilities to store assets
So as listed above there is only one option to persist assets - inside Drools Guvnor. In most of the cases this is good enough or even desired but there are quite few situation where modeling capabilities are required to be delivered with the custom application and including complete Drools Guvnor could be too much. 
That leads us to the flexible mechanism implemented - designer was equipped with Repository interface that is considered entry point to interact with underlying storage. Designer by default comes with Virtual File System based repository that provides:
  • default implementation that supports 
    • simple (local) file system repository
    • git based repository
  • allows for pluggable VFS provider implementations
  • is based on standards - java NIO2
Extensions to what is delivered out of the box can be done in one of the following ways:
  1. if VFS based repository is not what user needs an alternative implementation of the Repository interface can be provided, e.g data base
  2. if VFS is what user is looking for but neither local file system nor git is the right implementation additional providers can be developed
Let's look little bit deeper into what these new features are and how users will benefit from them. 

1. It's based on Java 7 NIO2


VFS support provides is based on Java SE 7 NIO2 but does not require Java 7 to run as it comes with backport implementation of selected parts of NIO2 that are required

2. Different providers for Virtual File System


The simplest option is to use designer with local file system storage that will simply utilize file system on which designer is running. As most likely it will provide the best performance it leaves user with rather limited options when it comes to clustering, distributed environments or backups.

Next option that personally would recommend is to utilize GIT as underlying storage. People that works with GIT in their software development projects will most likely notice quite few advantages as in the end process definitions are more like source code that can be versioned, developed in parallel (branching) and included in some sort of release cycle.

3. Save process directly in designer editor



Designer now allows users to save process directly from the editor which will store the svg process content as well with just one click!




4. Repository menu


With the repository designer provides a simple UI menu to navigate through the repository and perform basic operations such as:

  • open processes in designer editor
  • create assets and directories
  • copy/move assets
  • delete assets and directories
  • preview files

This menu is intended to be seen as basic file system browser utilized more in a standalone mode as when integrated with jBPM console-ng, guvnor-ng (UberFire) more advanced options will be delivered in this area.

5. Simpler integration with jBPM console and Drools Guvnor


Both jBPM console and Drools Guvnor are going to be "refreshed" for version 6.0 and thus integration between these components and designer will be simplified as they all will be unified on the repository level, meaning single repository can be shared across all these three components.



That will be all for a brief introduction but certainly not all in this topic. Expect more to come as soon as preview will be released on how to configure different repositories and more updates on git based repository on how to make best of it.

Your comments are more than welcome as they can help to make designer best modeling tool out there :)

Known limitation

Currently git based repository does not support move of assets and directories as atomic operation which means that preferred is to copy first and then delete.