2018/06/20

jBPM WorkItem Repository updates

Wanted to share some recent updates to the jBPM WorkItem Repository

1. Visual updates: the repository home page includes alot more information about workitems in the repository

Updated repo index page

Each row now displays the number of workitem handlers it includes. Also each row can be selected to display the handlers information and link to the handlers documentation page:

Workitem Handler information
The text download links have been replaced with a dropdown so if you extend the repository for your own needs you easily add more items to the dropdown:

Downloads dropdown

2. Functionality Search: Often users won't know what all they can do with workitems in the repository by just looking at their names alone. We have included a functionality search where you can search for actual functionalities you wish to include in your business processes, for example "upload", "detect", "send message" etc. The search then filters only the workitems in the repository which can perform this functionality:





3.  WildFly repository module: Similar to the repository-springboot module we have now added a repository-wildfly module as well.  This module builds a wildfly war as well as an out-of-the-box zip distribution that includes WildFly 11 and the repository already installed. For more info on how to set this up and use it see here


4. Repository rest api: If you are running your workitem repository with Spring Boot or WildFly the repository exposes a rest api for you. The currently implemented endpoints include:

/rest/services
/rest/services/{name}
/rest/services/{name}/parameters
/rest/services/{name}/results
/rest/services/{name}/mavendepends
/rest/services/category/{category}
/rest/servicetriggers
/rest/servicetriggers/count
/rest/serviceactions
/rest/serviceactions/count

and more can be easily added. Currently the response type of all these endpoints is application/json.

Sample results of repository rest api
The hope is that community can easily build client-side apps like installers etc that can consume and utilize the repository info.

That's it for now. We are looking to further improve the workitem repository and add a lot more to it. As always any help from our great jBPM community is more than welcome.




2018/06/15

jBPM 7.8 native execution of BPMN2, DMN 1.1 and CMMN 1.1

with upcoming 7.8 release of jBPM there is quite nice thing to announce - native execution of:

  • BPMN2 - was there already for many years
  • DMN 1.1 - from the early days of version 7
  • CMMN 1.1 - comes with version 7.8

The biggest thing coming with 7.8 is actually CMMN execution. It is mainly added for completeness of the execution so people who would like to model case with CMMN can actually execute that directly on jBPM (via KIE Server or embedded).

Although jBPM supports now CMMN, it is still recommended to use BPMN2 and case management features of jBPM for advanced cases to benefit from features that both specification brings rather to be limited to particular approach. Nevertheless CMMN can be a good visualisation for less complex cases where data and loosely coupled activities can build a good business view.

Disclaimer: jBPM currently does not provide nor plans to provide any modelling capabilities for CMMN.

With that said let's take a quick look at what is supported from the CMMN specification as obviously it's not covering 100% of the spec.

  • tasks (human task, process task, decision task, case task)
  • discretionary tasks (same as above)
  • stages
  • milestones
  • case file items
  • sentries (both entry and exit)
Not all attributes of tasks are supported - required, repeat and manual activation are currently not supported. Although most of the behaviour can still be achieved using different constructs.
Sentries for individual tasks are limited to entry criteria while entry and exit are supported for stages and milestones.

Decision task by default maps to DMN decision although ruleflow group based is also possible with simplified syntax - decisionRef should be set to ruleflow-group attribute.

Event listeners are not supported as they do not bring much value for execution and instead CaseEventListener support in jBPM should be used as substitute.

Let's have a quick look at how the sample Order IT case would look like designed in CMMN


some might say it's less or more readable and frankly speaking it's just a matter of preferences.

Here is a screencast showing this CMMN model being executed 


Next I'd like to show the true power of jBPM - execution of all three types of models:
  • CMMN for top level case definition
  • DMN for decision service
  • BPMN2 for process execution
you can add all of them into kjar (via import asset in workbench) build, deploy from workbench directly to KIE Server and execute. So here are our assets

A case definition that has:
  • decision task that invokes DMN decision that calculates vacation days (Total Vacation Days)
  • two human tasks that are triggered based on the data (entry criterion)
  • process task that invokes BPMN2 process if the entry condition is met


Here is our DMN model


and last but not least is the BPMN2 process (actually the most simple one but still a valid process)



Another thing to mention is that, all the models where done with Tristotech Editors to illustrate that they can be simply created with another tool and imported into kjar for execution.


Here is another screencast showing this all step by step, from exporting from Tristotech, importing into workbench, building and deploying kjar and lastly execute on KIE Server.


That's all to share for now, 7.8 is just around the corner so keep your eyes open and visit jbpm.org to learn more.

And at the end here are the links to the projects (kjars) in github


Enjoy!

2018/06/13

single zip distribution for jBPM

To simplify getting started experience for users I'd like to showcase a single zip distribution that includes:

  • WildFly server (at the moment version 11.0.0.Final)
  • workbench (aka jbpm console)
  • kie server with all capabilities enabled
  • jBPM case management show case application

All of them are perfectly configured and ready to run with just single and short command:
./stanalone.sh
or on windows
standalone.bat

The only thing user needs to do is download, unzip and run!

But that's not all that comes with this single zip distribution - it comes with very handy scripts that allow to switch to different databases as easy as just one click.
There are three databases supported out of the box:
  • H2 - default with file based data base stored under WILDFLY_HOME/standalone/data
  • MySQL
  • PostgreSQL
MySQL and PostgreSQL must be installed before use. Moreover the scripts assume following values:

  • host -> localhost
  • port -> 3306 for MySQL and 5432 for PostgreSQL
  • database name -> jbpm
  • user name -> jbpm
  • password -> jbpm
in case the values are not correct, edit them in the script files 
  • jbpm-mysql-config.cli for MySQL 
  • jbpm-postgres-config.cli for PostgreSQL 
in both scripts values to be updated are on line 17 and these are located under WILDFLY_HOME/bin.

To switch to MySQL stop the server and use following command when server is stopped
<WILDFLY_HOME>/bin/jboss-cli.sh --file=jbpm-mysql-config.cli           (Unix / Linux)

<WILDFLY_HOME>\bin\jboss-cli.bat --file=jbpm-mysql-config.cli     (Windows)

To switch to PostgreSQL stop the server and  use following command when server is stopped
<WILDFLY_HOME>/bin/jboss-cli.sh --file=jbpm-postgres-config.cli      (Unix / Linux)

<WILDFLY_HOME>\bin\jboss-cli.bat --file=jbpm-postgres-config.cli     (Windows)

next, start the server again and all your data will be stored in external database.

All this in action can be seen in this "not so short" screencast


As usual feedback welcome and please share your opinion if you'd like to see this in the official distribution of jBPM.

For those that would like to give it a go directly here is the project - just clone it and build locally - in case you want to use another version of jBPM change property named kie.version to the version number you want to use.