Conditions

Conditions

Overview

The if part of an approval rule consists of zero or more conditions. A condition is a statement that is either true or false, for a given transaction. For the rule to apply to a transaction, all of its conditions must be true for the transaction. The following graphic illustrates the conditions in rules and indicates the types of conditions:

the picture is described in the document text

While implementing the transaction type, creating conditions is an optional step.

Condition Types

There are two types of conditions:

Regular Conditions

Ordinary

An ordinary condition associates an attribute with a set of allowed values or range. Such a condition is true when the attribute has one of the allowed values. We then say that the attribute's value satisfies the condition. Ordinary conditions have one of the following three forms.

Conditions on Date, Number, and Currency Attributes

Conditions on number attributes associated with an approver type have the form,

attribute_name = approver_name

That is, the condition is true when the attribute's value is the ID of a specified approver of the type associated with the attribute.

Note: While defining a condition, if the attribute is linked to a value set, then you can make use of the available values in the value set.

Conditions on date and currency attributes, and number attributes not associated with an approver type, have the form,

lower_limit <{=} attribute_name <{=} upper_limit

When you create or edit this kind of condition, you decide whether to include the equals sign in the condition by selecting the appropriate values in the Expression region on the Create Condition and Edit Condition pages. If you create a set of conditions of this type on the same attribute, ensure to include each lower or upper limit only in one condition. For example, the conditions

1,000 <= TRANSACTION_AMOUNT < 2,000
2,000 <= TRANSACTION_AMOUNT < 3,000

have successive ranges of values that avoid overlapping at 2,000. In this way, at most one of the conditions will ever be true for any given transaction, which is typically the desired behavior.

Conditions on Boolean Attributes

Conditions on boolean attributes have the form,

attribute_name is {true, false}attribute_name is {true, false}

Ensure you understand the logic of your boolean conditions. Consider the following truth table:

Attribute Value Allowed Value Condition Value
true true true
true false false
false true false
false false true

That is, there are two ways a condition on a boolean attribute can be true. (Some AME users forget the italicized case in the above truth table.)

Conditions on String Attributes

Conditions on string attributes have the form,

attribute_name in {value_1, value_2, . . . }

The allowed values are case-sensitive, so allowed value and ALLOWED value are different allowed values. If you want a condition on a number or date and the condition to have a list of allowed values, then define a string attribute representing the textual representation of the number or date. Later define a condition on this string attribute.

Exception

Exception conditions have the same forms as ordinary conditions. The difference is, an exception condition can only appear in exception rules. See Rule Types for details.

List-Modifiers

A list-modification condition checks for the presence of a given target approver at a specific set of allowed locations in the default approver list. When the target approver is present in an allowed location, we say that the default approver list satisfies the condition.

There are two types of allowed location. When the condition specifies that the target approver must be the final approver, the target approver must be the last approver in a chain of authority. When the condition specifies that the target approver may be any approver, whether the approver must be in a chain of authority depends on the action type used by the rule that contains the list-modification condition. Action types for list-modification rules limit their scope to chains of authority. Substitution rules using an any-approver list-modification condition apply to all occurrences of the target approver throughout an approver list.

Condition Scope and Availability

An ordinary or exception condition is available in any transaction type that defines a use for the attribute that the condition references. If the value of the allowAllApproverTypes configuration variable is set to Yes, then all list modification conditions are available for the transaction type. If this configuration variable is set to No, then only the list modification conditions based on HR People and FND USER are available to the transaction type. The sharing of conditions simplifies rule sharing among transactions. It also means that when you edit a condition, the change affects all rules that use the condition; and when you delete a condition, the condition is no longer available in any transaction types.

Viewing Conditions

To display the list of conditions for a transaction type

Use the Business Dashboard and Conditions pages.

  1. Click the Conditions tab to display the Conditions page. If you are navigating from the Business Dashboard, then select the required transaction type in the Approval Process Setup available in the Business Dashboard.

  2. Click the Conditions link.

    The Conditions page opens displaying the list of conditions that are available to the current transaction type.

Creating an Ordinary or Exception Condition

To create an ordinary or exception condition

Use the Create New Condition page.

  1. Click the Conditions tab to open the Conditions page.

    Note: By default, the page displays the Regular conditions consisting of the ordinary and exception conditions.

  2. Click Create.

  3. Select the condition type.

  4. Select the attribute. Based on the attribute you select, you can record the following condition-related information in the Expression region:

    • If the attribute is of type number, and is associated with an approver type, then query for and select an approver of the type associated with the attribute.

    • If the attribute is of type date or currency, or is a number attribute not associated with an approver type, then enter the condition's lower and upper limits, and indicate whether each should be included in the condition's set of allowed values. If you leave a lower or upper limit blank, then the range of allowed values is unbounded on that side. If the attribute is of currency type, then choose the denomination of the lower and upper limits. The limits must be in the same denomination.

    • If the attribute is of type boolean, then select the condition's allowed value.

    • If the attribute is of type string, then enter the condition's allowed values.

      Note: If the attribute is associated with a value set, then you must select the value from the list of values.

  5. Click Create Another to create another condition.

  6. Click Apply to make the condition available for use within your approval rules.

Creating a List-Modification Condition

To create a list-modification condition

Use the Create New List Modification Condition page.

  1. Click the Conditions tab.

  2. Click the List Modifiers link to display the list modification conditions Search page.

  3. Click Create.

  4. Select the target approver's allowed location as the approver order.

  5. Select the type of the condition's target approver.

  6. Query for and select the target approver.

  7. Click Apply to make the condition available for use within your approval rules.

Editing Conditions

To edit a condition

Use the Update Condition page to edit an ordinary or exception condition and the Update List Modifier page to edit a list modification condition.

  1. In the Conditions page, display the list of regular or list modification conditions.

  2. Click the Update icon for the condition that you want to edit.

  3. Make your changes.

  4. Click Apply to update the condition.

Deleting Conditions

You can delete a condition only if it is not used in any current or future rule.

To delete a condition

Use the Conditions page.

  1. Display the list of regular or list modification conditions, as required.

  2. Click the Delete icon for the condition that you want to delete.

    Warning: If an inactive rule is using the deleted condition, then you cannot reinstate that rule.

  3. Confirm the deletion when prompted.