Monday, August 23, 2021

Configure To Order (Part 3)

Writing Rules:

There are different rules that you can write and use in configurator.

Navigation: Oracle Configurator Developer

select 'workbench' as shown below and click on Rules




click on create rules

There are different rules that you can write and use in configurator.



Select logic Rule and click continue.

In this example, we use rule as if any option is selected in desktop - Lenovo (left side of logic), then power cord and HDMI cable should be picked from accessories (Right side of logic) as shown below



Anytrue :     Any one from desktop - Lenovo is selected
AllTrue :       HDMI cable and Power cord (both) should be selected


The box circled in above picture are logical relationships.

Once the logic (left side and Right side selected), 

select the logical relationship. In above example lets use 'Implies'. This tells if 'Desktop - Lenovo' is selected, then HDMI cable and power cord should be picked.

Now, we have condition for left side, right side along with logical relationship. Next step is to convert this logical rule into statement rules. 

Click on 'convert to statement rules' to perform this action as highlighted in below snapshot.


below is the converted statement rule


click on 'Validate Rule text' to validate the rule as shown below


if rule is successful, then you see below message.


If there are errors, you can fix them and validate the text again.


***********************************************************************************
Brief snapshot on rules and logical relationships

Brief on Rules :

Rule Type

Description

Logic 

Defines a logical relationship between most types of Features, Options, and any type of BOM nodes.

Numeric 

Express constraints between Model objects in terms of numeric relationships.

Comparison

Performs a comparison between the values or Properties of two nodes, or a constant value.

Property-based Compatibility 

Specifies matches between the options of one or more Features or BOM Option Classes that have a common Property.

Explicit Compatibility 

Specifies matches between the options of one or more Features or BOM Option Classes in explicit tabular form.

Design Chart 

Specifies compatibility matches among the options of Features or BOM Option Classes in explicit tabular form.

Statement 

Allows more complex expressions and constraint definitions using the Constraint Definition Language (CDL).

Rule Sequences 

Specifies an ordered set of rules whose effectivity dates are set so that a rule in the sequence becomes effective at the same time its predecessor ceases to be effective.

Configurator Extensions

Use Java code that you write to perform functions that go beyond the functionality and rules that Oracle Configurator Developer provides.


Condition :

  • Select the AllTrue condition when defining a Logic Rule (or use the AllTrue function when defining a Statement Rule) if you want the relation to evaluate to true only when all terms are true. The relation is false if any term is false. This is a logical AND expression.

  • Select the AnyTrue condition when defining a Logic Rule (or use the AnyTrue function when defining a Statement Rule) if you want the relation to evaluate to true if any term is true. The relation is false only when all terms are false. This is a logical OR expression.

Implies

The effect of the Implies relation: If the end user selects Option A it becomes true and Option B is also selected. In other words, Option B’s logic state becomes true.

Logical Relationships

Excludes

The effect of the Excludes relation: If the end user selects Option A, it becomes true and Option B becomes false. In other words, Option B is excluded from the configuration.

Requires

If the end user selects an option on one side of the rule, the option on the other side of the rule is also selected. The same is true when the end user deselects an option. In other words, both options must be either included in the configuration, or excluded from the configuration.

Negates
The Negates relation is similar to the Requires relation, in that it also "pushes both ways." However, the Negates relation prevents an option from being selected when an option on the other side of the rule is selected. In other words, selecting one option prevents the other option from being included in the configuration.

Defaults
The effect of the Defaults relation: If the end user selects the Option A, it becomes true and Option B is also selected and becomes true.

***********************************************************************************

Next step is to create 'UI' (User Interface) for the model.

From configurator developer > workbench > click on User interface (as shown below)



click on 'create' to create user interface




give a name for UI (Desktop - Lenovo)


select the master template from the drop down list (Note : These are seeded templates. If you want to use your own template you can either customize it or can have completely custom UI as well).


Let me use "Single page layout' template and click on apply. 

Now we are good to test the model.

No comments:

Post a Comment

  Oracle Cloud Inventory Certification sample questions Sample cloud inventory certification questions 1.    Identify the correct movement r...