Product Administration Guide > Configuration Resources >

About Configuration Resources


Resources keep track of configuration variables that increase or decrease as the user configures a product. For example, suppose you are defining a desktop computer customizable product. The product includes several types of chassis. Each chassis has a different number of slots for expansion cards. Allowable configurations also include 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 that you must keep track of the number of slots during the configuration process to make sure that the customer configures the computer correctly.

Resources are the way you do this:

  1. First define a resource to keep track of slots, for example slots-resource.
  2. For the class containing all the chassis, define an attribute, slots-provided, that tells how many slots are in the chassis. Typically, this attribute will have a single-value domain and the data type will be Number.
  3. For each class containing expansion cards, define an attribute, slots-required, that tells how many slots each card needs, usually 1. Typically, this attribute will have a single-value domain, and the data type will be Number.
  4. Finally, write provide and consume constraint to manage the slots-resource.

When the user selects a chassis, a provide constraint adds the amount of the chassis' slots-provided attribute to the slots-resource. When the user selects an expansion card, a consume constraint subtracts the amount of the card's slots-required attribute from the slots-resource. In this fashion, the slots-resource keeps track of available slots in the computer chassis.

Resources definitions have the data type Number. This means that they can only have numeric, integer, or floating point values.

Product Administration Guide Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.