Information Technology Reference
In-Depth Information
Work item handler default configurations
This is a powerful trick for reconfiguring our KIE Workbench environment to have our
own default work item handlers, and it works for both the KIE Workbench as well as for
any other jBPM6- or Drools-based application that uses a KIE session. There is a configur-
ation file, called drools.session.conf , which defines the internal configurations of
some of the components in a KIE session. By default, this drools.session.conf file
has the following content inside the classpath:
drools.workItemHandlers = CustomWorkItemHandlers.conf
What this configuration has is a set of default values for our KIE session configuration ob-
jects. The drools.workItemHandlers property will allow us to define an MVEL file
path, relative to the drools.session.conf file, which will contain a map of our
WorkItemHandler instances indexed by their registry key. This MVEL map will be
used by the KIE sessions constructed in its specific environment to prepopulate its work
item handlers. We will use it, along with specific work item handlers added to our
classpath, to do the following:
• Override existing configurations for task behavioral definitions
• Make our own configurations for new task types
We can make use of work item handlers to create interactions with pretty much any form of
external system. Also, by adding the jbpm-workitems dependency to our project, we
can create or extend from a wide range of previously existing work item handlers that al-
low us to access web services, RSS feeds, interact with filesystems, FTP servers, databases,
Java beans, and many more components, as follows:
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-workitems</artifactId>
<version>6.1.0.Beta3</version>
</dependency>
This dependency is available inside the KIE Workbench libraries, so you can use them to
extend configurations without even writing a new WorkItemHandler definition.
We have defined a CustomWorkItemHandlers.conf file with extra features for our
custom KIE Workbench edition. In it, you can find definitions that come from the project
Search WWH ::




Custom Search