JBI Support deprecated in Apache ServiceMix 4

JBI 1.0 support is available in Apache ServiceMix 4 to allow existing users to migrate more easily to this latest version - if you're a new user, you should consider JBI deprecated and not use it for your project. Take a look at our technology selection guidelines for more information.

servicemix-drools

Overview

The ServiceMix Drools component provides JBI integration to the Drools Rules Engine.

This Service Engine can be used to deploy a rules set that will implement a router or an actual service.

A router will mostly act as a transparent proxy between the consumer and the target service provider mad will mostly be implemented by the jbi.route(uri) method below. This method creates a new exchange identical to the one received by the component and will send it to the specified destination. You can also send back a Fault if needed. A router can also be implemented by using directly the JBI Apis (available with the jbi helper) by using the provided client.

Namespace and xbean.xml

The namespace URI for the servicemix-bean JBI component is http://servicemix.apache.org/drools/1.0. This is an example of an xbean.xml file with a namespace definition with prefix bean.

<beans xmlns:drools="http://servicemix.apache.org/drools/1.0">

  <!-- add drools:endpoint definitions here -->

</beans>

Endpoint types

The servicemix-drools component defines one endpoint type:

  • drools:endpoint :: no description yet

drools:endpoint

Endpoint properties

Property Name Type Description
assertedObjects (java.lang.Object)\* List of additional objects to be inserted into the drools working memory for evaluating rules.
autoReply boolean Will this endpoint automatically reply to any exchanges not handled by the Drools rulebase?
component org.apache.servicemix.common.DefaultComponent
defaultTargetService javax.xml.namespace.QName The default service that the exchange will be sent to if none of the rules have handled it.
defaultTargetURI java.lang.String The default endpoint URI that the exchange will be sent to if none of the rules have handled it.
endpoint java.lang.String The name of the endpoint.
globals java.util.Map The global variables that are available while evaluating the rule base.
interfaceName javax.xml.namespace.QName The qualified name of the interface exposed by the endpoint.
namespaceContext javax.xml.namespace.NamespaceContext The namespace context to use when evaluating the rules.
ruleBase org.drools.RuleBase Set the rule base to be used for handling the exchanges
ruleBaseResource org.springframework.core.io.Resource Specifies the resource location to load the rule base from (.drl file)
ruleBaseURL java.net.URL Specifies a URL to load the rule base from (.drl file)
service javax.xml.namespace.QName The qualified name of the service the endpoint exposes.
su org.apache.servicemix.common.ServiceUnit