Product Administration Guide > Configuration Rule Template Reference >

Provide and Consume Templates


The Provide template has the form:

[An item] provides [a value] to [a target]

The Consume template has the form:

[An item] consumes [a value] from [a target]

Provide and consume rules positively or negatively increment the amount of the target operand each time the specified item is added to the solution. Provide rules contribute a positive amount, that is they increase the amount of the target. Consume rules contribute a negative amount, that is they reduce the amount of the target.

Contrast this with the behavior of require rules. For example, Item A requires Item B. The first time the user picks Item A, if no item B is in the solution, the eConfigurator engine will add at least one Item B. The second time the user picks Item A, the engine does not increment Item B because the require rule does not consider the quantity of Item A in the solution, only that Item A is present.

Now consider the rule Item A provides 1 to Item B. Each time the user picks Item A, the eConfigurator engine increments the number of Item B in the solution by 1. This rule ties the quantities of Item A and Item B together so that each Item A requires an Item B. Provide and consume rules work directly with quantities expressed as resource or attribute values, while require rules consider only the presence or absence of an item.

Item

The Item operand can be a product, a relationship, a product class within a relationship, a resource or an attribute. If the item is a relationship or class, the rule applies to all the items in the relationship or class. For example, Relationship A provides 1 to Item B. Each time an item from Relationship A is added to the solution, Item B is added to the solution.

Value

The value operand defines the quantity to be contributed to the target. The Rule Designer provides several methods for determining this quantity:

Target

The target operand is incremented by the amount specified in the value operand. The target can be a product, resource, or product attribute. It cannot be a relationship, a class, or an expression.

Product Target

When the target operand is a product, the quantity of the product is incremented. For example, Product A provides 2 to Product B. This rule means that each Product A added to the solution increases the quantity of Product B (the target) by 2.

The consume rule works the same way. For example, Product A consumes 2 from Product B. This rule means that each Product A added to the solution decreases the quantity of Product B (the target) by 2.

Resource Target

When the target is a resource, the value of the resource is incremented. One of the most common uses of provides and consume rules is to manage resources.

Resources keep track of configuration variables that increase or decrease as the user makes selections. For example, suppose you are creating a customizable product for configuring desktop computers. Your product includes several types of chassis. Each chassis has a different number of slots for expansion cards. The product also includes several types of expansion cards, such as disk controllers, and graphics cards.

You do not know in advance which chassis the customer will select or how many expansion cards. However, you do know you must keep track of the number of slots available in a chassis during the configuration process to verify that the computer is configured correctly.

Using provide and consume rules to increment a resource is the way to handle this:

When the user selects a chassis, the provide rule increases the Slots Available resource by the number of slots in the chassis. Each time the user selects an expansion card, the consume rule decreases the Slots Available resource by one. Thus, the Slots Available resource maintains a record of how many slots are available in the chassis during the configuration session.

If a resource has the same name in two different customizable products, the eConfigurator engines treats them as the same resource. You can take advantage of this in cases where one customizable product is contained within another. For example, customizable product CP2 is contained within customizable product CP1. You define resource R1 in both products. Rules in either customizable product that contribute to R1, affect the value of R1 in both products. Use this behavior to allow a parent customizable product to contribute to a resource in a child customizable product.

Attribute Target

When the target is an attribute, the value of the attribute is incremented. Attribute targets are very similar in behavior and use as resource targets. There are several restrictions on using provide and consume rules to manipulate attribute values:

Use attributes as targets instead of defining multiple resources that keep track of similar variables. This ties the variables directly to a class and makes it easier to keep track of the variables' roles.


 Product Administration Guide 
 Published: 23 June 2003