Friday, May 29, 2009

Drools Flow 5.1 Preview 1: Web console

Now that Drools 5 has been released, we're already working on the new features for the next release. I'll be adding some blog entries over the next few weeks about what we are planning to do for Drools Flow, and this is the first one.

Web-based management console for processes

Most of the work so far regarding Drools Flow has focused on creating a runtime for executing processes and the "hooks" to integrate that into your application. This involves APIs for starting processes, checking the status of running process instances, etc. Developers could use this API to retrieve the information they needed. There was however no easy way for non-technical people to access this information.

Heiko Braun has recently been working on a Business Process Management console which allows you to do just that ! And the console itself is completely pluggable, meaning that you can link in your own process engine implementation and extend the various views. So that is exactly what we did !

The console itself provides views for:
- viewing all processes that are part of your knowledge base
- starting and managing all running instances of a particular process
- showing the task list of the user
- reports summarizing of the execution history

The following screenshots show how this all looks like for a very simple employee performance evaluation process.

First you need to log in (role-based access control).


In the processes section you can get a overview of all the processes in your knowledge base, which is loaded from Guvnor. In this case, there's only one sample process called "com.sample.evaluation".


You can then get an overview of all the running process instances for that process. Since there are none, we quickly start a new one, after which we have one running instance, as shown below.


You can also get an overview of the current status of a specific process instance. In this case, our evaluation process is waiting for the user to perform a self-evaluation first (which is modeled using a human task node assigned to this user) before continuing, as shown by the icon in the top right corner of the node.


When switching to the task section, you can get an overview of all the tasks that a user can claim or that are assigned to him / her. In this case, there's only one task assigned to this user, which is the evaluation task created by starting our sample process as shown before.


The user can then execute his task. A task form linked to the task in question is then shown. These task forms can be created using freemarker templates and can ask specific input from the end user, which will then be returned to the process. This example shows a simple task form where the user has to fill in some evaluation questions and complete the form.


Finally, the report section allows you to view reports that show the history and/or current status of your processes. These reports are created using the Eclipse Business Intelligence and Reporting Tool (BIRT). This report for example shows the number of processes started (in the last few hours), the number of still active process instance and the average completion time per process. Users can define their own custom charts to monitor the key performance indicators of their business, based on the history data of the process engine and any other data sources available.

6 comments:

  1. Hello,
    is it available on trunk ?
    Nicolas Heron

    ReplyDelete
  2. Nicolas,

    Yes, at this point we still need to resolve some minor issues and simplify deployment, but the code is on svn trunk, under drools-process/drools-gwt-*.

    But this is only the backend implementation that links the console to Drools Flow. The gwt-console itself can be found here.

    ReplyDelete
  3. FYI, I've just released 1.0.0.CR1 of the gwt-console.

    ReplyDelete
  4. Could you also post some high level deploy (packaging) notes?
    How to package the drools-gwt-console,-form,-graph jars, with respect to the gwt-console-server and gwt-console-server-integration modules ?
    Thanks.

    ReplyDelete
  5. Hi Kris,

    I am trying to run gwt-console but I'm having some errors.
    I'm using Drools 5.1.0 M1 and this is what I've done so far:

    1. Deploy a process to default package in Guvnor. Process has been built and a snapshot created. I can successfully add the package through a test class from eclipse by executing kbuilder.add( resourceFactory.newUrlResource("http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/default/LATEST"), ResourceType.PKG ); And process runs and completes without any errors.

    2. Set up:
    a. Created a data source called testDS1-ds.xml and placed it "jboss-4.2.3.GA\server\default\deploy"
    b. Copied H2 database driver h2-1.0.77.jar to "jboss-4.2.3.GA\server\default\lib"
    c. Copied gwt-console-rpc.jar to "jboss-4.2.3.GA\server\default\lib" folder.
    d. Copied gwt-console-server-integration.jar to "jboss-4.2.3.GA\server\default\lib" folder.
    e. Installed Birt reporting engine 2.5.2 by copying ReportEngine folder to "jboss-4.2.3.GA\server\default\data\birt" directory.
    f. Copied H2 database driver h2-1.0.77.jar to the ReportEngine "jboss-4.2.3.GA\server\default\data\birt\ReportEngine\plugins\org.eclipse.birt.report.data.oda.jdbc_2.5.2.v20100205"
    f. Copied process_summary.rptdesign, overall_activity.rptdesign, process_instancess_report.rptdesign obtained from drools-bam module to "jboss-4.2.3.GA\server\default\data\birt" directory
    g. Copied gwt-console-server-drools-5.1.0.M1.war to "jboss-4.2.3.GA\server\default\deploy"
    h. Copied gwt-console-drools-5.1.0.M1.war to "jboss-4.2.3.GA\server\default\deploy"

    3. Start up:
    i. Started H2 database
    J. Started drools TaskService
    K. Started JBoss

    Problems:
    - There are some error logs in jboss log right from the go when staring up. No stack trace but logs with ERROR level.
    - When I click Processes >> Process List >> Processes I can't see my process and Jboss logs a stack trace.
    - I also noticed that ProcessEngine plugin does NOT check out green.

    Am I missing something? Do I wrong versions of jars?

    Error logs and Stack trace are to long to include here. Let me know if I can get those to you some other way.

    Thanks a lot

    ReplyDelete
  6. please provide the svn link gwt-console.

    ReplyDelete