You create a style in the Styles view of Oracle Commerce Developer Studio.
A style serves three functions:
It controls the minimum and maximum number of records that may be promoted by a rule
It defines property templates, which facilitate consistent property usage between pipeline developers and business users of Oracle Commerce Workbench
It indicates to a Web application which rendering code should be used to display a rule’s results
Styles can be used to affect the number of promoted records in two scenarios.
The first case is when a rule produces less than the minimum number of records. For example, if the “Best Buys” rule produces only two records to promote and that rule is assigned a style that has Minimum Records set to three, the rule does not return any results.
The second case is when a rule produces more than the maximum. For example, if the “Best Buys” rule produces 20 records, and the Maximum Records value for that rule’s style is five, only the first five records are returned. If a rule produces a set of records that fall between the minimum and maximum settings, the style has no effect on the rule’s results.
The Maximum Records setting for a style prevents dynamic business rules from returning a large set of matching records, potentially overloading the network, memory, and page size limits for a query.
For example, if Maximum Records is set to 1000, then 1000 records could potentially be returned with each query, causing significant performance degradation.
Rule properties are key/value pairs typically used to return supplementary information with promoted record pages.
For example, a property key might be set to "SpecialOffer" and its value set to "BannerAd.gif".
As Oracle Commerce Workbench users and Developer Studio users share a project with rule properties, it is easy for a key to be mis-typed. If this happens, then the supplementary information represented by a property does not get promoted correctly in a Web application. To address this, you can optionally create property templates for a style. Property templates ensure that property keys are used consistently when pipeline developers and Oracle Commerce Workbench users share project development tasks.
If you add a property template to a style in Oracle Commerce Developer Studio, that template is visible in Oracle Commerce Workbench in the form of a pre-defined property key with an empty value. Oracle Commerce Workbench users are allowed to add a value for the key when editing any rule that uses the template’s associated style. Oracle Commerce Workbench users are not allowed to edit the key itself.
Furthermore, pipeline developers can restrict Oracle Commerce Workbench users to creating new properties based only on property templates, thereby minimizing potential mistakes or conflicts with property keys. For example, a pipeline developer can add a property template called “WeeklyBannerAd” and then make the project available to Oracle Commerce Workbench users. Once the project is loaded in Workbench, a property template is available with a populated key called "WeeklyBannerAd" and an empty value. The Oracle Commerce Workbench user provides the property value. In this way, property templates reduce simple project-sharing mistakes such as creating a similar, but not identical property called "weeklybannerad".
Note
Property templates are associated with styles in Developer Studio, not rules. Therefore, they are not available for use on the Properties tab of the Rule editor.