http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/index.html#d0e13220
さあ、やっとワークベンチきました。
V. Drools Workbench
15. Workbench
15.1. Installation
15.1.1. War installation
kie-wb-*.war です。
15.1.2. Workbench data
データは $WORKING_DIRECTORY/.niogit 以下に保存されます。でも他にも repositories や .index もある。
15.2. Quick Start
スクリーンショット付きでざっくりと説明。
15.2.1. Add repository
15.2.2. Add project
15.2.3. Define Data Model
15.2.4. Define Rule
15.2.5. Build and Deploy
15.3. Administration
Organizational unit 1->N Repository 1->N Project という包含関係です。そんで後述する方法でユーザのロールを Organizational unit や Repository に割り当てられる(複数可)ので、柔軟に組み合わせられます。
15.3.1. Administration overview
15.3.2. Organizational unit
15.3.3. Repositories
Repositoryは VFS (Virtual File System) 上に作成されます。デフォルトは git です。とりあえず git 以外を考慮する必要はないでしょう。
.niogit から直接 clone しないように!
Commit の Revert は GUI からできるけど、git のフル機能がGUIから使えるわけでは無い。ブランチ/タグとかは今後実装される予定。
15.4. Configuration
15.4.1. User management
15.4.3. Restricting access to repositories
CLIでユーザのロールを Organizational unit や Repository に割り当てられる。GUIでもできて欲しいですかね。
15.4.4. Command line config tool
CLI、意外と強力なので使おう。
15.5. Introduction
15.5.1. Log in and log out
15.5.2. Home screen
15.5.3. Workbench concepts
個人的にこの用語重要(バグ報告とかソース読むとかで)
- Part : 個々の Editor や Explorer の画面
- Panel : Part が表示される場所。複数の Part を保持できる
- Perspective : Part / Panel をまとめたもの。"Project Authoring" や "Administration" がひとつの Perspective を指す。Perspectiveの状態はユーザごとに永続化されている。
15.5.4. Initial layout
15.6. Changing the layout
15.6.1. Resizing
15.6.2. Repositioning
15.7. Authoring
15.7.1. Artifact Repository
これがひとつの Maven repository になる。GUI でアップロードしてもいいし、 mvn deploy も使える ( これが直ったら https://bugzilla.redhat.com/show_bug.cgi?id=1112062 )。
15.7.2. Asset Editor
C: の Config で、import を定義するので注意。
15.7.3. Project Explorer
「+」アイコンのクリックで開き、パッケージをたどらないと、パッケージ下にあるリソースが見えないので注意。
15.7.4. Project Editor
"Project Settings" から設定ビューをいろいろ切り替えられる。基本的に pom.xml や kmodule.xml の編集をGUIで手伝ってくれてるだけなので、Repository View で直接ファイルを確認するのがおすすめ。
"Import Suggestions" に "java.util.ArrayList" とか入れておくと、後で各ルールの Config で選べるようになる。
15.7.5. Validation
15.7.7. Categories Editor
バージョン6からは、selector を使ってカテゴリでフィルタビルドとかの機能が無いので、もうカテゴリはあまり役に立ちません的な。
16. Authoring Assets
各エディタの使い方が丁寧に書いてある。いいよー。
16.1. Creating a package
16.1.1. Empty package
16.2. Business rules with the guided editor
16.2.1. Parts of the Guided Rule Editor
16.2.2. The "WHEN" (left-hand side) of a Rule
16.2.3. The "THEN" (right-hand side) of a Rule
16.2.4. Optional attributes
16.2.5. Pattern/Action toolbar
16.2.6. User driven drop down lists
16.2.7. Augmenting with DSL sentences
16.2.8. A more complex example:
16.3. Templates of assets/rules
テンプレートでDRL生成。サクッとできて結構便利。とはいえワークベンチ前提じゃなければ、何使ってもいい思う。
16.3.1. Creating a rule template
16.3.2. Define the template
16.3.3. Defining the template data
16.3.4. Generated DRL
16.4. Guided decision tables (web based)
このエディタもすごくよくできてる。でも Excel だとマクロやセル参照使えるからなー。
16.4.1. Types of decision table
16.4.2. Main components\concepts
16.4.3. Defining a web based decision table
16.4.4. Rule definition
16.4.5. Audit Log
16.5. Spreadsheet decision tables
XLS(Excel)とGDST(Web decision table)はフォーマットが違うので、互いにコンバートできないので注意。どっちで行くか最初に決めよう。
16.6. Scorecards
スコアカード、いまいちユースケースが分からないっていうか、普通のルールでできるユースケースのなかのごく一部って感じかなあ。スコアリングは Planner でもやるね。
16.6.1. (a) Setup Parameters
16.6.2. (b) Characteristics
16.7. Test Scenario
テストシナリオもドキュメントができて、ありがたいことです。でもちょっと物足りないか。コレクションのデータ設定方法とか書いといて欲しいところ。気が向いたら pull request するか。
16.7.1. Given Section
16.7.2. Expect Section
16.7.3. Global Section
16.7.4. New Input Section
16.8. Functions
16.9. DSL editor
16.10. Data enumerations (drop down list configurations)
ここ定義したら、各エディタのドロップダウンリストに反映させることができます。地味にいけてる。