이 콘텐츠는 선택한 언어로 제공되지 않습니다.

16.5. Using Rule Services with JBoss Rules


The JBoss Enterprise SOA Platform's rule service allows you to deploy business rules, written by your firm's business analyst in JBoss Rules, as services on the ESB. This has two major benefits:
  • the amount of client code required to integrate the rules into your application environment is dramatically reduced.
  • rules can be accessed from either an action chain or from within an orchestrated business process.

Note

The JBoss Business Rules Management System is the supported option but you can also use a rule engine if you so desire.
The rule service functionality is provided by the BusinessRulesProcessor and DroolsRuleService action classes, the latter of which also implements the RuleService interface.
The BusinessRulesProcessor class allows rules to be loaded from the class-path. These rules are defined in .drl and .dsl files, and also in decision tables (which come in .xls format). These file-based rules exist primarily for the purpose of allowing you to test prototypes. There is no way to specify multiple rule files for a single BusinessRulesProcessor action. More complex rule services require the use of the JBoss Rules KnowledgeAgent.
The RuleService uses the KnowledgeAgent to access rule packages from either the Business Rules Management System or from the local file system. Rule packages can contain thousands of rules from different sources, including these:
  1. the JBoss Business Rules Management System
  2. imported DRL files
  3. domain-specific language (DSL) files
  4. decision tables

Important

Red Hat recommends that you use the KnowledgeAgent approach on production systems.
The BusinessRulesProcessor action supports both of JBoss Rules' execution models, namely the stateless and stateful models.
Most rule services will adhere to the stateless model. In this model, a message will be sent to the rule service containing all the facts that are to be processed by the rule engine. The rules then execute and update the message and/or facts.
By contrast, a stateful execution takes place over a longer period time, with several messages being sent to the rule service. Each time a message is sent, the rules are executed again and the message and/or facts are updated. At the conclusion of the process, a final message tells the rule service to dispose of the stateful session's working memory , which is then purged from the rule engine.

Important

RuleAgent is no longer used in the SOA Platform's ESB. It has been replaced by the KnowledgeAgent which is configured differently. The Polling configuration for DRL changes is no longer done via the ruleAgentProperties file's poll property). You now configure it globally via the org.jboss.soa.esb.services.rules.resource.scanner.interval property, found within esb.deployer/jbossesb-properties.xml . (The default value is 60.) This means that every sixty seconds, the system checks for resource changes across all KnowledgeAgents.
You will need to provide these properties to access URLs that are secured with basic authentication:
username=admin password=admin enableBasicAuthentication=true

Note

There can only be a single rule service in the message flow in the stateful model.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동