이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 3. Guided Rules


Guided Rules are business rules that you can create in a UI-based Guided Rules designer that leads you through the rule creation process. The rule designer provides fields and options for acceptable input based on the object model of the rule being edited. All data objects related to the rule must be in the same project package as the rule. Assets in the same package are imported by default. You can use the Data Objects tab of the rule designer to verify that all required data objects are listed or to import any other needed data objects.

Figure 3.1. The Guided Rule designer

3.1. Creating the Driver License Suspension rule

The Driver license suspension rule is created using the Guided Rule wizard and is comprised of various conditions and their resulting actions.

Prerequisite

Created both the Violation and Driver data objects.

Procedure

  1. Log in to Decision Central. Click Menu Design Projects, then Driver department traffic violations.
  2. Click Create New Asset Guided Rule, then enter:

    • Guided Rule: DriverLicenseSuspensionRule
    • Package: com.myteam.driverdepartmenttrafficviolations
  3. Click Ok to open the Guided Rule designer.

    Figure 3.2. Create new Guided Rule window

3.2. Setting the Suspension rule conditions

The Suspension rule contains conditions that are used to determine the driver’s violation.

Prerequisite

You have created the Driver License Suspension rule

Procedure

  1. Click 6176 next to the WHEN label to open the Add a condition to the rule window. . . Select Driver and click Ok.

    Figure 3.3. Create new Guided Rule window

  2. Click the There is a Driver label to open the Modify constraints for Driver window.
  3. Enter driver in the Variable name field and click Set.
  4. Click the There is a Driver[driver] and click Expression editor.
  5. Click [not bound] to open the Expression editor.
  6. In the Bind the Expression to a new variable field, enter: previousPts and click Set.
  7. From the Choose menu, select totalPoints.
  8. Click 6176 next to line 1 (the previousPts label) to open the Add a condition to the rule window.
  9. Select From Accumulate and click Ok.
  10. Click click to add pattern above the From Accumulate label and select Number from the choose fact type pull-down menu.
  11. Click There is a number label to open the Modify contraints for Driver window.
  12. Click Expression editor and select intValue() from the [not bound]: Choose menu.
  13. Click [not bound] to open the Expression editor.
  14. In the Bind the Expression to a new variable field, enter: totalNewPoints and click Set.
  15. Click click to add pattern and select Violation from the choose fact type pull-down menu.
  16. Click All Violation with: to open the Modify contraints for Violation window and select points from the Add a restriction on a field pull-down menu.
  17. Click please choose next to the points label and select greater than.
  18. Click 6191 , then click Literal value.
  19. Click the points label to open the Add a field window and enter vPoints and click Set.
  20. In the Function field, enter sum(vPoints).
  21. Select greater than or equal to from the totalNewPoints please choose pull-down menu.
  22. Click 6191 , click New formula, and enter 20-previousPts in the new field.
  23. Click Save, then click Save to confirm your changes.

Figure 3.4. Suspension Rule conditions

3.3. Setting the Suspension rule actions

The Suspension rule actions determine a driver’s resulting penalties including points and fine amounts based on the Suspension rule conditions.

Prerequisite

You have created set the Suspension rule conditions

Procedure

  1. Click (show options…​).

    Figure 3.5. show options selection

  2. Click 6176 next to the THEN label and select Change field values of driver, then click Ok.
  3. Click the Set value of Driver [driver] field and select state from the Add field pull-down menu.
  4. Click 6191 next to state in the Set value of Driver [driver] section to open the Field value window.
  5. Click Literal value and enter suspend in the new field.

    Figure 3.6. New field

  6. Click 6176 next to the (options) label below the Set value of Driver [driver] section.
  7. From the Add an option to the rule window, select the ruleflow-group option from the Attribute pull-down menu.
  8. Enter trafficViolation in to the ruleflow-group field.
  9. Click Save, then click Save to confirm your changes.

    Figure 3.7. Suspension rule actions

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat