Configuration Hiding Rules
Overview
What are they?
Hiding attribute rules tell the system to hide select attributes when a pre-defined condition is satisfied. Like other rules, hidden attribute rules are made up of a condition and an action. The values of the attribute(s) selected as the condition attribute(s) determines the result of the condition, which when true triggers the hiding of the action attributes.
How do they work?
Using hidden attribute rules, you can reduce the number of flow rules needed for a configuration process. You can include different attribute types in a single flow rule and show one set of attributes in another, based on the same condition.
AJAX can be enabled for any constraint or hiding configuration rule. Unlike other rules, that are evaluated only if the attributes are set to auto update or if a user clicks the Update action, AJAX rules are evaluated and the action is performed instantly when a user changes any rule input. Input can be condition and action attributes or action inputs. AJAX rules are re-run when a user clicks the Update button.
AJAX hiding rules do not support hiding the tab when all attributes are hidden in it. Similarly, a tab that is hidden will not appear via AJAX if the user “unfires” the associated hiding rule. The user must perform an Update action to view/hide tabs. Also, if a required attribute is hidden through an AJAX rule, no validation error will be thrown on Update or invoke actions.
Best Practices and Tips
- AJAX Rules are supported on Search Flow and Model Configuration pages.
- AJAX rules are not supported for the default wizard.
- If an AJAX rule fails to evaluate properly, the action will be timed out in 2 minutes.
- The HTML structure has been modified and may not work well with any custom JavaScript on the page. Please validate upon upgrading to 11.1.
- AJAX Rule without SOAP/ Table Queries –AJAX rules are not recommended to be used on rules with a large amount of BML, SOAP calls, or table queries as it could adversely impact performance and hence, end user experience.
- AJAX Rule with fewer action attributes - AJAX rules update the page using JavaScript post page loads. Hence it is important that we limit the number of attributes being affected per AJAX.
- Group headers that are hidden on page load cannot be shown/hidden again via AJAX. While attribute in the group can be shown/hidden via an AJAX hiding rule, the group header will remain hidden until the user performs an Update action.
Administration
- Navigate to the Hiding Attribute: Rules List page.
- Click Admin to go to the Admin Home Page.
-
Click Catalog Definition in the Products section.
The Supported Products page opens.
-
In the Navigation drop-down, choose Hiding Attributes and click List.
The Hiding Attribute: Rules List page opens.
-
Click Add.
The Hiding Rule: New Rule page opens.
-
Enter the rule Properties.
This section is where you will enter basic details about the rule. For example, the name, status and where it will be applied.
Label Description Name Enter the name of the rule. This is required. Variable Name Enter a variable name for the rule. The Variable Name field populates automatically. Variable names can only contain alpha-numeric characters and underscores. The entry can be changed before saving, but after saving the value is read-only.This is required. Description Enter a description, if desired. Status Determine the status of the rule:
- Active: Rule is fired when the condition is met.
- Internal: Rule is active only for FullAccess users; it is inactive for all other users.
- Inactive: Rule is not fired, even if the condition is met.
Edit Start/End Dates Select the box to open a date selector to set how long the rule will remain in the chosen status. If no duration is selected, the rule will remain on the selected status until you, or another FullAccess user, changes it. AJAX Enabled Upon checking this box, you are enabling AJAX functionality for the rule. This means that the rule will run without refreshing the page or requiring an action be performed.
- Prior to 19B, AJAX functionality is only available for Hiding and Constraint rules.
-
Beginning in Oracle CPQ 19B, Recommendation Rules can be AJAX enabled for JET Configuration UIs. AJAX functionality is only provided for JET Configuration UIs, this functionality is not available for legacy Configuration UIs.
-
Select the Condition Type.
The condition section allows you to select the logic that specifies when a rule should run. There are three options: Always True, Simple Condition and Advanced Condition.
- Always True: The rule will fire automatically, every time, because a specific condition does not need to be met.
- Simple Condition: The rule will fire based on define condition attribute values that you select from a menu.
-
Advanced Condition: The rule will fire based on an advanced function written with BML.
Conditions are returned as Boolean.
- Choose to apply the rule to either Configuration, Selection, or Both. Configuration is the default selection.
-
Click Add Attributes to open the Action Attribute window.
-
Choose the configuration attributes that should be hidden when the condition is met and click Add.
Adding an Associated Recommendation Rule
A hiding rule can have one associated recommendation rule.
When users are configuring a model, they could end up with an internal constraint error, which they cannot fix. An internal constraint error occurs when there are constraints on hidden attributes and the values of these hidden attributes cannot be modified. To avoid these situations, you can modify the values of hidden attributes through recommendations. In this case, if a constraint is fired, then the value of this attribute can be set by the recommendation to avoid an internal constraint error.
You are unable to set the value into an action attribute because it could be a "None" set type and this will prevent the user from continuing on with the configuration. To avoid this, we provide attribute set types in recommendations so that the recommendation rule set type takes precedence over the attribute set type and modifies the value of the hidden attribute. Therefore the Constraint action becomes invalid and hence the internal constraint error is no longer visible.
Creating an Associated Recommendation Rule
Follow these steps:
-
Click Add Associated Recommendation Rule in the right panel of the Action section of a Hiding Rule.
You must save the Hiding Rule before you can add an Associated Recommendation Rule. -
Enter the rule Properties.
This section is where you will enter basic details about the rule. For example, the name, status and where it will be applied.
Label Description Name Enter the name of the rule. This is required. Variable Name Enter a variable name for the rule. The Variable Name field populates automatically. Variable names can only contain alpha-numeric characters and underscores. The entry can be changed before saving, but after saving the value is read-only.This is required. Description Enter a description, if desired. Status Determine the status of the rule:
- Active: Rule is fired when the condition is met.
- Internal: Rule is active only for FullAccess users; it is inactive for all other users.
- Inactive: Rule is not fired, even if the condition is met.
Edit Start/End Dates Select the box to open a date selector to set how long the rule will remain in the chosen status. If no duration is selected, the rule will remain on the selected status until you, or another FullAccess user, changes it. AJAX Enabled Upon checking this box, you are enabling AJAX functionality for the rule. This means that the rule will run without refreshing the page or requiring an action be performed.
- Prior to 19B, AJAX functionality is only available for Hiding and Constraint rules.
-
Beginning in Oracle CPQ 19B, Recommendation Rules can be AJAX enabled for JET Configuration UIs. AJAX functionality is only provided for JET Configuration UIs, this functionality is not available for legacy Configuration UIs.
-
Select your Condition Type.
The condition section allows you to select the logic that specifies when a rule should run. There are three options: Always True, Simple Condition and Advanced Condition.
- Always True: The rule will fire automatically, every time, because a specific condition does not need to be met.
- Simple Condition: The rule will fire based on define condition attribute values that you select from a menu.
-
Advanced Condition: The rule will fire based on an advanced function written with BML.
Conditions are returned as Boolean.
Configuration Context Attribute
Beginning in Oracle CPQ 24B the Config Operation Context (
_config_operation_context
) configuration system attribute can be used to identify the operation that initiated the current Configuration session. This read only system attribute will reflect unique values for new configurations, reconfigurations, search flows, and ABO Modify actions.The Config Operation Context system attribute is available for use in all Configuration Rule type conditions and in BML advanced conditions and/or actions. For example, when a Config Operation Context attribute is selected in a simple condition, the possible values (
new
,reconfigure
,modify_asset
, andsearch_flow
) can be selected in the Values drop-down.The Config Operations Context attribute can be used in Configuration Rules to allow Administrators to better manage the configuration experience if necessary. For example, if an administrator would like to define a rule that should only execute for a new configuration, or resulting from a modify asset action, they can use this new attribute to control execution.
- Choose to apply the rule to either Configuration, Selection, or both. Configuration is the default selection.
- Choose the Action type:
- Standard: You will use the UI to add attributes.
- Table Lookup: Select attribute values from a table. For more information, see the topic Table Based Rules.
- Select an attribute whose value needs to be set and select one of the following options under Values to Set:
- Choose attribute values from the Select Values menu.
- Click Define BML Function to set values through a BML script.
- Choose the Set Type:
- None: The user can input any value without encountering an error message.
- Set: A recommendation rule can change the value entered by the user unless the attribute is locked by the user.
- Forced Set: A recommendation rule will change the value of the attributes regardless of what the user enters and if the attribute is locked or not.
- Click Update and Back to save and return to the Hiding Attribute Rule, where you will now see a link to the associated rule.
Notes
When the FullAccess user can disassociate a rule, they have the option of easily deleting the associated rule.
To "dynamically" hide attributes, make sure the condition attributes are set to auto update.
All Hiding Rules (AJAX and non-AJAX) will collapse the space taken by a group when all attributes in the group are hidden. This functionality is only available for custom (non-default) groups.
The Associated Recommendation Rule is available on the Recommendation Rules List page.
The associated recommendation rule will not be updated at the time of updating the parent rule, but a link to it is provided so that it can be updated after modifying the hiding rule.