建立及編輯動作規則,以測試您在前一項作業中所文字化的商業元素。
關於這項作業
按照這些指示的說明,將規則構件儲存在規則套件中,而不直接儲存在 rules 資料夾中。
程序
如果要測試動作規則中的詞彙,請執行下列動作:
- 建立規則套件:
現在,您將建立下列動作規則,以使用與客戶和租約有關的詞彙:
if
the duration of the rental agreement is more than 20
then
make it true that the customer of the rental agreement is loyalty program member;
- 在「規則瀏覽器」中,選取 資料夾,在檔案功能表中,按一下。
- 在「新建規則套件」精靈的套件欄位中,輸入 Loyalty。
- 按一下完成。
新的規則套件會出現在「規則瀏覽器」視圖中。
- 建立新的動作規則:
在 Intellirule 編輯器中,使用「內容輔助」機制,在「內容」區段中輸入規則的內容。
- 用滑鼠右鍵按一下 Loyalty 套件,然後按一下。這時會開啟「新建動作規則」精靈。
- 在名稱欄位中,輸入 AwardLoyalty,然後按一下完成。
新的動作規則會出現在「規則瀏覽器」視圖中,並且開啟 Intellirule 編輯器。
- 編輯動作規則:
- 在 Intellirule 編輯器的「內容」區段中,輸入 if,然後按 Enter 鍵。
- 在下一行中,按 Alt+/,啟動「內容輔助」方框。
- 在「內容輔助」方框中,選取術語和詞組,直到產生下列表示式為止:
the duration of the rental agreement is more than 20
- 在下一行中,輸入 then,然後按 Enter 鍵。
- 在「內容輔助」方框中,選取術語和詞組,直到產生下列表示式為止:
make it true that the customer of the rental agreement is loyalty program member;
- 儲存您的工作。
如需使用規則編輯器的相關資訊,請參閱使用動作規則。
結果
在下一項作業中,您將擴充詞彙,使其包含不存在於 XOM 中,但可對映至 XOM 的商業元素。