此内容没有您所选择的语言版本。

18.8. Creating a New Rule


Procedure 18.3. Task

  1. Create an empty text .drl file.
  2. Copy and paste your rule into it.
  3. Save and exit.
  4. Alternatively, use the Rules Wizard to create a rule but pressing Ctrl+N or by choosing it from the toolbar.
  5. The wizard will ask for some basic options for generating a rule resource. For storing rule files you would typically create a directory src/rules and create suitably named subdirectories. The package name is mandatory, and is similar to a package name in Java. (That is, it establishes a namespace for grouping related rules.)
  6. Select the options that suit you and click Finish.
Result

You now have a rule skeleton which you can expand upon.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat