Top
Systemwalker Runbook Automation Studio User's Guide
Systemwalker

10.3.3 Adding or Editing Decisions

Please note that before executing this procedure, a Decision Table file must have been created, and the necessary conditions and results must have been defined.

This section explains the procedure for editing a Decision Table.

  1. Double click the Decision Table file from Rules folder of the application. The Decision Table file is located in the corresponding Rules Set folder.

  2. To add a new decision to the Decision Table, in the Decision section of the Decision Table Editor, click Add.

    A new row will be added with incremental serial number in the No. column of the Decisions table. If this is the first decision you are adding to the Decision Table the numeral 1, is displayed in the No. column.

  3. The conditions and results that you added previously, are displayed as separate columns in the Decisions section.

  4. Click the cell corresponding to a condition. A text area followed by the Expression Builder button is displayed. Click the button.

    The Expression Builder dialog is displayed.

  5. Select the operation that you want to apply for the condition from the Operator drop-down.

    Figure 10.8 Expression Builder

    The Expression Builder can be used to generate an expression for the condition, using the following comparison operators.

    • <= (less than or equal to)

    • < (less than)

    • = (equal)

    • != (not equal)

    • > (greater)

    • >= (greater than or equal to)

    • in

    • between

    • like

    • notlike

    Note

    • You can also modify the condition and result values directly in the Decision table. To do this, click on the cell in the condition or results column and enter the expression in the text area. An error is displayed in case the expression is entered in a wrong format.

    • For the operators =,!=,<,>,<=,>= , the format is operator followed by the value. For example, =xyz. For operators in,like,not like, between the format is operator(value1,value2...). For example, in(a,b,c).

    The following table lists different operators supported for specific data types.

    Operator

    Boolean

    Integer

    Float

    Long

    BigDecimal

    Date

    String

    <

    No

    Yes

    Yes

    Yes

    Yes

    Yes

    No

    >=

    No

    Yes

    Yes

    Yes

    Yes

    Yes

    No

    <=

    No

    Yes

    Yes

    Yes

    Yes

    Yes

    No

    >=

    No

    Yes

    Yes

    Yes

    Yes

    Yes

    No

    !=

    Yes

    Yes

    Yes

    Yes

    Yes

    Yes

    Yes

    =

    Yes

    Yes

    Yes

    Yes

    Yes

    Yes

    Yes

    in

    No

    Yes

    Yes

    Yes

    Yes

    Yes

    Yes

    between

    No

    Yes

    Yes

    Yes

    Yes

    Yes

    No

    like

    No

    No

    No

    No

    No

    No

    Yes

    notlike

    No

    No

    No

    No

    No

    No

    Yes

  6. Click OK.

    The expression is displayed in the Decision Table Editor, corresponding to the condition.

  7. In the Discount column, enter the value for the decision, if a given condition is true.

    For example, the decision in the below screen shows if CustomerType = Gold, Region = CA, then Discount = 10.

    Figure 10.9 Adding a Decision

    When specifying multiple conditions, you can leave the value of one of the conditions blank. A blank value is a wildcard that matches any value. The decision displayed in the figure above executes with any DayOfWeek

    Note

    Blank values can be provided as input values for any condition, even for conditions of type BOOLEAN. Blank input values are treated as wildcards.x

At run time, This product evaluates all of the defined decisions in the order shown on the Decision Table Details page. When defining decisions, ensure that the order makes sense. If multiple decisions apply, the result of the decision that is evaluated first is finally used. As an example, say you define the following discount rules:

If a process instance has a sales amount of $70000, both decisions match. But as soon as the first discount rule is evaluated, the discount rate is set to 20%. The second Decision is ignored. If you want to add a decision with values of all conditions as blank, and if it is the first decision to be evaluated then that decision will be used. The other decisions will be ignored.

To validate decision rules, see 10.5 Validating Decision Table Rules .

To know about mapping UDAs, conditions and results to a Process Definition using JavaAction, see 10.6 Using the Decision Table Action .