クエリー・アクション
クエリー・アクションでは、クエリーの条件が満たされた場合に実行するアクションを指定します。
クエリーのデフォルト・アクションでは、「検索」ウィンドウにクエリーの結果が表示されます。 ただし、Do ステートメントをクエリーに追加して、クエリーのアクションを拡張できます。
以下のアクションを指定して、ルールを管理できます。
表示エレメントを別のフォルダーにコピーまたは移動
表示エレメントを削除
表示エレメントにカテゴリーを追加、または表示エレメントからカテゴリーを削除
表示エレメントのプロパティー (発効日、状況、優先度など) を指定する値に設定
使用可能なアクションはクエリーで指定されるプロジェクト・エレメントにより異なります。 例えば、選択できるアクションは、変数に基づくクエリー用のものに比べて、ビジネス・ルールに基づくクエリー用のものが多くあります。
例 1
以下の例では、ビジネス・ルールの状況を new から validated に変更します。
Find all business rules such that the status of each business rule is new Do set the status of each business rule to validated
例 2
以下の例では、'the insurance rate' の値を変更する意思決定表を収集して、'insurance' パッケージにグループ化します。
Find all decision tables such that each decision table modifies the value of 'the insurance rate' Do move each decision table to package "insurance"
例 3
以下の例では、特定のクレジット・スコアになる可能性があり、有効期限が特定の日付の後にあるルールを削除します。
Find all business rules such that each business rule may lead to a state where [the credit score of ‘a borrower’ is less than 5 ] and the expiration date of each business rule is after 6/21/2007 Do delete each business rule