Show Table of Contents
8.6. Registering Service Handlers
Service handlers must be registered to execute domain-specific services as custom service tasks, this happens because the process only contains a high-level description of the service that needs to be executed; accordingly, a handler is responsible for invoking the service.
Service handlers are registered by adding a configuration file that specifies the implementation of class for each of the handlers to the classpath. You can specify which configuration files are loaded in a
drools.session.conf file by using the drools.workItemHandlers property as a list of space delimited file names:
drools.workItemHandlers = CustomerWorkItemHandlers.conf
These file names should contain a Map of entries, the name and the corresponding WorkItemHandler instance that should be used to execute the service. The configuration file is using the MVEL script language to specify a map of type Map<String,WorkItemHandler>:
[ "log" : new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(), ]
The implementation classes (and dependencies) also need to be added to the classpath of the server war.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.