デシジョンサービスのスタートガイド


Red Hat Decision Manager 7.1

Red Hat Customer Content Services

概要

このチュートリアルでは、運転免許停止のシナリオを作成し、テストします。

前書き

ビジネスアナリストやルール開発者は、Red Hat Decision Manager の Decision Central を使用して、さまざまなデシジョンサービスを設計できます。このチュートリアルでは、運転免許停止のシナリオを作成し、テストします。

前提条件

第1章 交通違反プロジェクトの作成

プロジェクトは、データオブジェクト、ガイド付きデシジョンテーブル、ガイド付きルールなどのアセットのコンテナーです。このチュートリアルでは、Driver_department_traffic_violations (運転者部門の交通違反) プロジェクトを作成します。

手順

  1. Decision Central にログインします。
  2. MenuDesignProjects を選択します。

    ヒント: Red Hat Decision Manager は以下のイメージにあるとおり MySpace と呼ばれるデフォルトスペースを提供します。このデフォルトスペースを使用してサンプルプロジェクトを作成およびテストできます。

    図1.1 デフォルトスペース

    spaces teams
  3. Add Project をクリックします。
  4. Name フィールドに Driver_department_traffic_violations と記入します。
  5. Add をクリックします。

    図1.2 Add Project ウインドウ

    addproject

プロジェクトの Assets ビューが開きます。

第2章 データオブジェクト

データオブジェクトは、作成するルールアセットの構成要素です。データオブジェクトは、プロジェクトで指定したパッケージに Java オブジェクトして実装されているカスタムのデータ型です。たとえば、データフィールド NameAddress、および Date of Birth を使用して Person オブジェクトを作成し、ローン申し込みルールに詳細な個人情報を指定できます。このカスタムのデータ型は、アセットとディシジョンサービスがどのデータに基づいているかを指定します。

以下の表は、本チュートリアルで作成する Violation (違反) および Driver (運転者) データオブジェクトを示しています。

表2.1 Violation データオブジェクト
IDLabelType

code

Code

String

points

Points

Integer

violationDate

Violation Date

Date

type

Type

String

fineAmount

Fine Amount

Double

speedLimit

Speed Limit

Integer

actualSpeed

Actual Speed

Integer

表2.2 Driver データオブジェクト
IDLabelType

name

Name

String

age

Age

Integer

state

State

String

city

City

String

violations

Violations

Violation (org.jboss.example.traffic_violations.Violation) 注記: violations フィールドは、指定されたタイプの複数のアイテムを保持するために "List" に設定されています。

fineAmount

Fine Amount

Double

totalPoints

Total Points

Integer

reason

Reason

String

2.1. Violation データオブジェクトの作成

Violation データオブジェクトには、Violation Date (違反日)、Fine Amount (罰金額)、Speed Limit (制限速度) など、違反の詳細を基にしたデータフィールドが含まれます。

前提条件

Driver_department_traffic_violations プロジェクトを作成していること。

手順

  1. Add AssetData Object の順にクリックします。
  2. Create new Data Object ウィザードで以下の値を入力します。

    • Data Object: Violation
    • Package: com.myspace.driver_department_traffic_violations を選択します。
  3. OK をクリックします。

    図2.1 Create new Data Object ウインドウ

    data object

2.1.1. Violation データオブジェクト制限の追加

Violation データオブジェクトフィールドに、ルールを定義する際に選択する制限を設定します

前提条件

Violation データオブジェクトを作成していること。

手順

  1. 'Violation'-general properties セクションの Label フィールドに Violation と入力します。

    図2.2 プロパティー

    gen props
  2. + add field をクリックします。
  3. 以下の値を入力します。

    • Id: code
    • Label: Code
    • Type: String
  4. Create and continue をクリックした後、以下の値を入力します。

    • Id: points
    • Label: Points
    • Type: Integer
  5. Create and continue をクリックした後、以下の値を入力します。

    • Id: violationDate
    • Label: Violation Date
    • Type: Date
  6. Create and continue をクリックした後、以下の値を入力します。

    • Id: type
    • Label: Type
    • Type: String
  7. Create and continue をクリックした後、以下の値を入力します。

    • Id: fineAmount
    • Label: Fine Amount
    • Type: Double
  8. Create and continue をクリックした後、以下の値を入力します。

    • Id: speedLimit
    • Label: Speed Limit
    • Type: Integer
  9. Create and continue をクリックした後、以下の値を入力します。

    • Id: actualSpeed
    • Label: Actual Speed
    • Type: Integer
  10. Create をクリックします。
  11. Save をクリックした後、Save をクリックして変更を確認します。
  12. Driver_department_traffic_violations ラベルをクリックして、プロジェクトの Assets ビューに戻ります。

    図2.3 Violation データオブジェクトフィールド

    violation data fields

2.2. Driver データオブジェクトの作成

Driver データオブジェクトには、NameAgeTotal Points などのドライバーの詳細に基づくデータフィールドが含まれます。

前提条件

Driver_department_traffic_violations プロジェクトを作成していること。

手順

  1. Add AssetData Object の順にクリックします。
  2. Create new Data Object ウィザードで以下の値を入力します。

    • Data Object: Driver
    • Package: com.myspace.driver_department_traffic_violations を選択します。
  3. OK をクリックします。

    図2.4 Create new Data Object ウインドウ

    data object2

2.2.1. Driver データオブジェクト制限の追加

Driver データオブジェクトフィールドに、ルールを定義する際に選択する制限を設定します

前提条件

Driver データオブジェクトを作成していること。

手順

  1. 'Driver'-general properties セクションの Label フィールドに Driver と入力します。
  2. + add field をクリックします。
  3. 以下の値を入力します。

    • Id: name
    • Label: Full Name
    • Type: String
  4. Create and continue をクリックした後、以下の値を入力します。

    • Id: age
    • Label: Age
    • Type: Integer
  5. Create and continue をクリックした後、以下の値を入力します。

    • Id: state
    • Label: State
    • Type: String
  6. Create and continue をクリックした後、以下の値を入力します。

    • Id: city
    • Label: City
    • Type: String
  7. Create and continue をクリックした後、以下の値を入力します。

    • Id: violations
    • Label: Violations
    • Type: Violation(com.myspace.driver_department_traffic_violations.Violation)
    • List: このチェックボックスを選択すると、このフィールドで、指定した型のアイテムを複数保持できるようになります。
  8. Create and continue をクリックした後、以下の値を入力します。

    • Id: fineAmount
    • Label: Fine Amount
    • Type: Double
  9. Create and continue をクリックした後、以下の値を入力します。

    • Id: totalPoints
    • Label: Total Points
    • Type: Integer
  10. Create and continue をクリックした後、以下の値を入力します。

    • Id: reason
    • Label: Reason
    • Type: String
  11. Create をクリックします。
  12. Save をクリックした後、Save をクリックして変更を確認します。
  13. Driver_department_traffic_violations ラベルをクリックして、プロジェクトの Assets ビューに戻ります。

    図2.5 Driver データオブジェクトフィールド

    driver data fields

第3章 ガイド付きルール

ガイド付きルールとは、ルール作成のプロセスを説明する UI ベースのガイド付きルールデザイナーで作成できるビジネスルールです。ルールデザイナーは、編集されるルールのオブジェクトモデルを基にした許可される入力のフィールドおよびオプションを提供します。ルールに関連するすべてのデータオブジェクトは、ルールと同じプロジェクトパッケージに存在する必要があります。同じパッケージのアセットはデフォルトでインポートされます。ルールデザイナーの Data Objects タブを使用すると、必要なデータオブジェクトがすべてリストされていることを検証したり、他に必要なオブジェクトをインポートしたりできます。

図3.1 ガイド付きルールデザイナー

The Guided Rule designer

3.1. Driver License Suspension ルールの作成

ガイド付きルールウィザードを使用して、ドライバーの運転免許停止ルールを作成します。

前提条件

ViolationDriver の両方のデータオブジェクトを作成していること。

手順

  1. Decision Central にログインします。
  2. MenuDesignProjects の順にクリックし、Driver_department_traffic_violations をクリックします。
  3. Add AssetGuided Rule の順にクリックし、以下を入力します。

    • Guided Rule: DriverLicenseSuspensionRule
    • Package: com.myspace.driver_department_traffic_violations
  4. Ok をクリックして ガイド付きルールデザイナー を開きます。

    図3.2 Create new Guided Rule ウインドウ

    guided rule

3.2. Suspension ルール条件の設定

運転者の違反を判断する Suspension ルールの条件を設定します。

前提条件

Driver License Suspension (運転免許停止) ルールを作成していること。

手順

  1. WHEN ラベルの横にある ( 6176 ) をクリックして、Add a condition to the rule ウィンドウを開きます。
  2. Driver を選択し、OK をクリックします。

    図3.3 Create new Guided Rule ウインドウ

    add condition
  3. There is a Driver ラベルをクリックして Modify constraints for Driver ウィンドウを開きます。
  4. Variable name フィールドに driver と入力し、Set をクリックします。
  5. There is a Driver[driver] をクリックし、Expression editor をクリックします。
  6. [not bound] をクリックし、Expression editor を開きます。
  7. Bind the Expression to a new variable フィールドに previousPts と入力し、Set をクリックします。
  8. Choose メニューで totalPoints を選択します。
  9. 1 行目 (previousPts ラベル) の横にある ( 6176 ) をクリックし、Add a condition to the rule を開きます。
  10. From Accumulate を選択し、Ok をクリックします。
  11. From Accumulate ラベルの上にある click to add pattern をクリックし、choose fact type メニューで Number を選択します。
  12. There is a number ラベルをクリックして Modify contraints for Driver ウインドウを開きます。
  13. Expression editor をクリックし、[not bound]: Choose メニューで intValue() を選択します。
  14. [not bound] をクリックし、Expression editor を開きます。
  15. Bind the Expression to a new variable フィールドに totalNewPoints と入力し、Set をクリックします。
  16. click to add pattern をクリックし、choose fact type メニューで Violation を選択します。
  17. All Violation with: をクリックして Modify contraints for Violation ウインドウを開き、Add a restriction on a field メニューで points を選択します。
  18. points ラベルの横にある please choose をクリックし、greater than を選択します。
  19. ( 6191 ) をクリックした後、 Literal value をクリックします。
  20. points ラベルをクリックして Add a field ウインドウを開きます。
  21. vPoints と入力し、Set をクリックします。
  22. Function フィールドに sum(vPoints) と入力します。
  23. totalNewPointsplease choose メニューで greater than or equal to を選択します。
  24. ( 6191 ) をクリックして New formula をクリックし、新しいフィールドに 20-previousPts と入力します。
  25. Save をクリックした後、Save をクリックして変更を確認します。

図3.4 Suspension ルールの条件

rule conditions

3.3. Suspension ルールアクションの設定

Suspension ルールアクションを設定します。これは、ドライバーの罰則を判断するもので、Suspension ルール条件に基づく点数および罰金額が含まれます。

前提条件

Suspension ルール条件が作成されていること。

手順

  1. (show options…​) をクリックします。

    図3.5 show options の選択

    show options
  2. THEN ラベルの横にある ( 6176 ) をクリックし、Change field values of driver を選択した後、Ok をクリックします。
  3. Set value of Driver [driver] フィールドをクリックし、Add field メニューで state を選択します。
  4. Set value of Driver [driver] セクションの state の横にある ( 6191 ) をクリックし、Field value ウインドウを開きます。
  5. Literal value をクリックし、新しいフィールドに suspend と入力します。

    図3.6 新しいフィールド

    suspend entry
  6. Set value of Driver [driver] セクションの下の (options) ラベルの横にある ( 6176 ) をクリックします。
  7. Add an option to the rule ウインドウの Attribute メニューで ruleflow-group オプションを選択します。
  8. ruleflow-group フィールドに trafficViolation と入力します。
  9. Save をクリックした後、Save をクリックして変更を確認します。

    図3.7 Suspension ルールアクション

    rulepanel

第4章 ガイド付きディシジョンテーブル

ガイド付きデシジョンテーブルは、アップロードされたデシジョンテーブルのスプレッドシートに代わる方法で、ウィザードを用いてビジネスルールを表形式で定義します。ガイド付きデシジョンテーブルでは、プロジェクトの指定のデータオブジェクトを基にして Decision Central の UI ベースのウィザードに従ってルール属性、メタデータ、条件、およびアクションの定義します。ガイド付きデシジョンテーブルの作成後、定義したルールはその他すべてのルールアセットとともに Drools Rule Language (DRL) ルールにコンパイルされます。

ガイド付きデシジョンテーブルに関連するすべてのデータオブジェクトは、ガイド付きデシジョンテーブルと同じプロジェクトパッケージに存在する必要があります。同じパッケージのアセットはデフォルトでインポートされます。必要なデータオブジェクトとガイド付きデシジョンテーブルの作成後、ガイド付きデシジョンテーブルデザイナーの Data Objects タブを使用して、必要なデータオブジェクトがすべてリストされていることを検証したり、 新規アイテム を追加してその他の既存データオブジェクトをインポートしたりできます。

4.1. 交通違反のガイド付きデシジョンテーブルの作成

ガイド付きデシジョンテーブルデザイナーを使用して、運転者の違反とその違反による罰金や点数を指定する交通違反のガイド付きデシジョンテーブルを作成します。

前提条件

ViolationDriver の両方のデータオブジェクトを作成していること。

手順

  1. Decision Central にログインします。
  2. MenuDesignProjects の順にクリックし、Driver_department_traffic_violations をクリックします。
  3. Add AssetGuided Decision Table とクリックし、以下を入力します。

    • Guided Decision Table: SpeedViolationRule
    • Package: com.myspace.driver_department_traffic_violations
  4. Hit Policy メニューで Unique Hit を選択します。
  5. Table format セクションの Extended entry, values defined in table body を選択します。
  6. Ok をクリックして ガイド付きデシジョンテーブル デザイナーを開きます。

    図4.1 ガイド付きディシジョンテーブルデザイナー

    dec table

4.1.1. Violation Type 列の挿入

Violation Type 列には、運転者の運転速度やアルコールや薬物の影響下で運転していたかどうかなど、違反の詳細が含まれます。

前提条件

交通違反のガイド付きデシジョンテーブルが作成されていること。

手順

  1. ColumnsInsert Column をクリックし、Include advanced options を選択します。

    図4.2 Columns タブ

    column tab
  2. Add an Attribute column を選択し、Next をクリックします。

    図4.3 Add a new column ウインドウ

    new column
  3. Ruleflow-group を選択し、Finish をクリックします。
  4. Attribute columns を展開し、Default value フィールドに trafficViolation と入力します。

    図4.4 Attribute columns ウインドウ

    attrib column
  5. Insert Column をクリックし、Add a ConditionPattern+Create a new Fact Pattern を選択します。
  6. Fact type メニューで Violation を選択し、Binding フィールドに v を入力し、OK をクリックします。

    図4.5 Create a new fact pattern ウインドウ

    fact pattern
  7. Calculation typeLiteral value を選択します。

    図4.6 Calculation type オプション

    literal value
  8. Field を選択し、Field メニューで type を選択します。
  9. Operator を選択した後、Operator メニューで equal to を選択します。
  10. Value options を選択し、Value list (optional) フィールドに Speed,Driving while intoxicated,DWI=Driving while under the influence of drugs と入力します。
  11. Additional info を選択し、Header (description) フィールドに Violation Type と入力します。Finish をクリックします。

    図4.7 Violation Type ヘッダー

    violation columns
  12. Insert Column をクリックし、Add a ConditionPattern と選択し、Pattern メニューで Violation[v] を選択します。
  13. Calculation typePredicateField を選択し、 actualSpeed-speedLimit > $param と入力します。
  14. Value options を選択した後 Additional info を選択し、Header (description) フィールドに Speed Limit (MPH) > と入力します。
  15. Finish をクリックします。

    図4.8 Speed Limit (MPH) > ヘッダー

    speed header
  16. Insert Column をクリックし、Add a ConditionPattern と選択し、Pattern メニューで Violation[v] を選択します。
  17. Calculation typePredicate を選択します。
  18. Field を選択し、Field フィールドに actualSpeed-speedLimit < $param と入力します。
  19. Operator を選択し、Value options を選択した後、Additional info を選択します。
  20. Header (description) フィールドに Speed Limit (MPH) < と入力し、Finish をクリックします。

    図4.9 Condition columns

    cond columns

4.1.2. Fine Amount および Points 列の挿入

Fine Amount* および Points 列には、対応する Violation Type フィールド値を基にした罰金と点数が含まれます。

前提条件

交通違反のガイド付きデシジョンテーブルに Violation Type コラムを挿入していること。

手順

  1. Insert Column をクリックし、Set the value of a fieldPattern を選択し、Pattern メニューで Violation[v] を選択します。
  2. Field を選択し、Field メニューで fineAmount を選択します。
  3. Value options を選択した後 Additional info を選択し、Header (description) フィールドに fineAmount と入力します。
  4. Update engine with changes オプションを選択し、Finish をクリックします。

    図4.10 Fine Amount ヘッダー

    fine amount
  5. Insert Column をクリックし、Set the value of a fieldPattern を選択し、Pattern メニューで Violation[v] を選択します。
  6. Field を選択し、Field メニューで points を選択します。
  7. Value options を選択した後 Additional info を選択し、Header (description) フィールドに Points と入力します。
  8. Update engine with changes オプションを選択し、Finish をクリックします。

    図4.11 Action columns

    point amount

4.1.3. ガイド付きデシジョンテーブル行の挿入

ガイド付きデシジョンテーブルの列を作成したら、デシジョンテーブルデザイナー内で行を追加してルールを定義することができます。

前提条件

交通違反のガイド付きデシジョンテーブルで Violation TypeFine AmountPoints の各コラムを作成していること。

手順

  1. EditorInsertAppend row をクリックします。5 つの行を追加するまでこの動作を繰り返します。
  2. 以下の例のように表を入力します。

    図4.12 入力されたデータフィールド

    guided dt ds
  3. Save をクリックした後、Save をクリックして変更を確認します。

第5章 テストシナリオ

Red Hat Decision Manager のテストシナリオでは、ルール、モデル、およびイベントの機能を実稼働環境にデプロイする前に検証できます。テストシナリオでは、ファクトまたはプロジェクトモデルのインスタンスと似ている条件のデータを使用します。このデータは特定のルールセットと照合され、想定された結果が実際の結果と一致するとテストに成功します。想定された結果が実際の結果と一致しない場合はテストに失敗します。

テストシナリオをすべて実行した後、シナリオの状態は Reporting パネルに報告されます。

テストシナリオは、1 度に 1 回またはグループ単位で実行できます。グループの実行では、1 つのパッケージのすべてのシナリオが対象になります。テストシナリオは独立したものであり、1 つのシナリオが他のシナリオを変更したり、影響を与えたりすることはありません。

5.1. 制限速度シナリオのテスト

交通違反のガイド付きデシジョンテーブルを作成したときに指定したデータを使用して制限速度のシナリオをテストします。

前提条件

  • Driver_department_traffic_violations プロジェクトを作成していること。
  • ViolationDriver のデータオブジェクトを作成していること。
  • 交通違反のガイド付きデシジョンテーブルが作成されていること。

手順

  1. Decision Central にログインします。
  2. MenuDesignProjects の順にクリックし、Driver_department_traffic_violations をクリックします。
  3. Add AssetTest Scenario の順にクリックします。
  4. Create new Test Scenario window ウィザードで以下の値を入力します。

    1. Test Scenario: Speed limit 10-20.
    2. Package: com.myspace.driver_department_traffic_violations を選択します。
  5. OK をクリックします。
  6. +GIVEN をクリックして New input ウィンドウを開きます。
  7. Insert a new fact メニューで Violation を選択します。
  8. Fact name フィールドに violation と入力し、Add をクリックします。
  9. Insert 'Violation'[violation] の下にある Add a field をクリックして Choose a field to add ウインドウを開きます。
  10. Choose a field to add メニューで speedLimit を選択し、OK をクリックします。
  11. ( 6191 ) をクリックした後、speedLimit の横にある Literal value をクリックします。
  12. Field value ウインドウの Literal value をクリックした後、speedLimit フィールドに 40 を入力します。
  13. Insert 'Violation'[violation] をクリックします。
  14. Choose a field to add ウインドウの Choose a field to add メニューで type を選択し、OK をクリックします。
  15. ( 6191 ) をクリックした後、Literal value の横にある Literal value をクリックします。
  16. type フィールドに Speed と入力します。
  17. Insert 'Violation'[violation] をクリックします。
  18. Choose a field to add メニューで actualSpeed を選択し、OK をクリックします。
  19. ( 6191 ) をクリックした後、Literal value の横にある Literal value をクリックします。
  20. actualSpeed フィールドに 55 と入力します。
  21. +Expect をクリックして New expectation ウインドウを開きます。
  22. Rule メニューを展開して Row 1 SpeedViolationRule を選択し、OK をクリックします。
  23. +GIVEN をクリックして New input ウインドウを開き、Activate rule flow group フィールドに trafficViolation と入力し、Add をクリックします。
  24. +Expect をクリックして New expectation ウインドウを開き、Fact value: violation の横にある Add をクリックします。
  25. Violation 'violation' has values: をクリックし、 Choose a field to add ウインドウを開きます。
  26. Choose a field to add メニューで fineAmount を選択し、OK をクリックします。
  27. fineAmount: equals フィールドに 100.0 と入力します。
  28. Violation 'violation' has values: をクリックし、 Choose a field to add ウインドウを開きます。
  29. Choose a field to add メニューで points を選択し、OK をクリックします。
  30. points: equals フィールドに 1 を入力します。
  31. Save をクリックした後、Save をクリックして変更を確認します。
  32. Run scenario をクリックします。

    図5.1 速度テストの結果画面

    Speed test results screen

テストシナリオで設定された値と条件がスピード違反のガイド付きディシジョンテーブルで指定した要件に合致していれば、ウィンドウ下部にある Reporting セクションに Success メッセージが表示されます。

5.2. 運転免許停止シナリオのテスト

Driver License Suspension のルールおよびアクションを設定したときに指定したデータを使用して運転免許停止シナリオをテストします。

前提条件

  • Driver_department_traffic_violations プロジェクトを作成していること。
  • ViolationDriver のデータオブジェクトを作成していること。
  • 運転免許停止のルールおよびアクションが設定されていること。

手順

  1. Decision Central にログインします。
  2. MenuDesignProjects の順にクリックし、Driver_department_traffic_violations をクリックします。
  3. Add AssetTest Scenario の順にクリックします。
  4. Create new Test Scenario window ウィザードで以下の値を入力します。

    1. Test Scenario: Suspend due to total points.
    2. Package: com.myspace.driver_department_traffic_violations を選択します。
  5. OK をクリックします。
  6. +GIVEN をクリックして New input ウィンドウを開きます。
  7. Insert a new fact メニューで Driver を選択します。
  8. Fact name フィールドに driver と入力し、Add をクリックします。
  9. 'Driver'[driver] の下にある Add a field をクリックして Choose a field to add ウインドウを開きます。
  10. Choose a field to add メニューで totalPoints を選択し、OK をクリックします。
  11. totalPoints の横にある ( 6191 ) をクリックして Literal value をクリックした後、totalPoints フィールドに 10 を入力します。
  12. +GIVEN をクリックして New input ウィンドウを開きます。
  13. Insert a new fact メニューで Violation を選択します。
  14. Fact name フィールドに violation と入力し、Add をクリックします。
  15. Insert 'Violation'[violation] の下にある Add a field をクリックして Choose a field to add ウインドウを開きます。
  16. Choose a field to add メニューで points を選択し、OK をクリックします。
  17. ( 6191 ) をクリックした後、Literal value の横にある Literal value をクリックします。
  18. points フィールドに 10 を入力します。
  19. +Expect をクリックして New expectation ウインドウを開きます。
  20. Rule メニューを展開して DriverLicenseSuspensionRule を選択し、OK をクリックします。
  21. +GIVEN をクリックして New input ウインドウを開き、Activate rule flow group フィールドに trafficViolation と入力し、Add をクリックします。
  22. +Expect をクリックして New expectation ウインドウを開き、Fact value: driver の横にある Add をクリックします。
  23. Driver 'driver' has values: をクリックし、 Choose a field to add ウインドウを開きます。
  24. Choose a field to add メニューで state を選択し、OK をクリックします。
  25. state: equals フィールドに suspend と入力します。
  26. Save をクリックした後、Save をクリックして変更を確認します。
  27. Run scenario をクリックします。

    結果

    ルールが実行され、点数の合計が >= 20 であるため、運転者の運転免許が停止となります。

    図5.2 停止テストの結果画面

    Suspension test results screen

テストシナリオで設定された値と条件が運転免許停止のルールおよびアクション設定時に指定した要件に合致していれば、ウィンドウ下部にある Reporting セクションに Success メッセージが表示されます。

5.3. 複数違反シナリオのテスト

Suspend due to total points アセットをコピーおよび編集し、Driver License Suspension ルールおよびアクションの設定時に指定したデータを使用して複数の違反行為を行ったドライバーの運転免許停止シナリオを作成します。

前提条件

  • Driver_department_traffic_violations プロジェクトを作成していること。
  • ViolationDriver のデータオブジェクトを作成していること。
  • 運転免許停止のルールおよびアクションが設定されていること。

手順

  1. Decision Central にログインします。
  2. MenuDesignProjects の順にクリックし、Driver_department_traffic_violations をクリックします。
  3. Suspend due to total pointsCopy をクリックし、New Asset Name フィールドに Suspend due to multiple violations を入力して Make a Copy をクリックします。
  4. SpaceMySpaceDriver_department_traffic_violations をクリックした後、Suspend due to multiple violations アセットを選択します。
  5. +GIVEN をクリックして New input ウィンドウを開きます。
  6. Insert a new fact メニューで Violation を選択します。
  7. Fact name フィールドに violation2 と入力し、Add をクリックします。
  8. points の横にある ( 6191 ) をクリックし、Literal value をクリックした後、pointsviolation2 フィールドに 5 を入力します。
  9. totalPoints の値を 10 から 5 に変更します。
  10. Save をクリックした後、Save をクリックして変更を確認します。
  11. Run scenario をクリックします。

    図5.3 停止テストの結果画面

    Suspension test results screen

テストシナリオで設定された値と条件が運転免許停止のルールおよびアクション設定時に指定した要件に合致していれば、ウィンドウ下部にある Reporting セクションに Success メッセージが表示されます。

付録A バージョン情報

本書の最終更新日: 2018 年 11 月 1 日

法律上の通知

Copyright © 2019 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat