Properties
As described in Properties, a property is an attribute of a model, option class, or option item. It is used as a basic building block for rule creation.
The Comergent eBusiness System provides a set of built-in properties which are understood by the C3 Configurator engine. These control the behavior of the engine and the presentation of the model to the end-user. These properties are summarized in Comergent eBusiness System Properties.
You can also define properties and they are available for use in any part of the model group and model hierarchy beneath the point at which they are defined. These defined properties are used to describe the product so that the C3 Configurator engine can ensure that the user-configured model is valid.
Working With Properties
To Define a Property
- Navigate to and select the location in the model group hierarchy where you want to create the property.
See To Access the Visual Modeler for information on how to navigate the model group hierarchy.
This is important since where you create the property determines what objects in the hierarchy can use the property. See Properties for a more detailed explanation.
- When you reach the appropriate level, click on the Properties tab.
- Within the Properties tab, click the Define tab.
- Enter a name for the property.
|
Do not begin a property name with "UI:" or "CONFIG". Do not include a period (.) in a property name. |
- Select a property type from the drop-down list.
- Number: use this for any property whose value is determined by a number. For example, the weight of an item could be expressed as a real number of grams (including decimals).
- String: use this for any property that is expressed as a word or phrase. For example, you can use a string-valued property to indicate the color of an option item.
If you select this type, then the Localize field is enabled. If you check this box, then you can enter values for this property in any of the supported locales. In other words, if you enter the original value in English, then you can change the system locale to German and then modify the property's value in German. The German value will appear for those users whose locale is German; the English value will appear for those users whose locale is English.
- List: use this for any property where the value of the property must be selected from a list. For example, the availability of an item might be limited to specifying one or more days of the week. You can capture this in the form of a property by defining a list called "Weekdays" whose values are Sunday, Monday, and so on, concluding with Saturday.
- If applicable, define a default value that this property takes. You can override this value when you apply the property to an item or class.
If you selected "List" as the property type, then the Value field displays a drop-down selection of the current lists available. Select a list. See Lists for information about creating lists.
- Click Add.
The new property appears in the boxes below the fields.
- Click Save All Changes to save the new property.
To Attach a Property
You define a property at the model group or model level (see To Define a Property). You attach a property to a model, an option class, or an option item.
- Click Configuration Models in the Product and Catalog Administration panel on the Comergent eBusiness System home page.
- In the Navigation frame, navigate to the object to which you want to attach the property.
- Click on the Properties tab.
This displays two sets of fields: one called Unattached Properties for selecting properties and defining values for them, and one called Attached Properties that shows the properties that are currently attached.
|
The Properties tab for a model contains two tabs: Attach and Define. You use the Define tab to define properties. See To Define a Property. |
- Select a property from the Unattached Properties drop-down list.
The property will display any default value defined for it.
- Enter a value for the property. You can set the value of a property simply by entering its value in the text field, or you can use a property editor window to set a value. See To Use the Property Editor Window for details.
- Click Attach.
The newly-attached property appears among the Attached Properties.
- Click Save All Changes.
|
You must perform this last step. Otherwise the property will not be attached. |
To Use the Property Editor Window
The Numeric Property Editor window and the String Property Editor window are used to edit property values.
- You can invoke the property window editor simply by clicking the Edit button next to any property.
When you do so, a Property Editor window is displayed.
- You can use this window to specify a fixed value of a property or to specify a formula that is used to calculate a value at runtime. If the first character of the text area is "=", then the editor window assumes that you want to create a formula, and the expansion fields are activated to help you define the formula.
- The syntax of a formula depends on whether you are editing a numeric or a string property:
- If you are working on a numeric property, then when you specify a formula, use the drop-down lists as follows:
- Function: select one of the defined functions. See Table 12, Function Definitions for a description of the available functions.
- Property: specify the property whose values should be used to calculate the function.
- Location: specify where the named property (or properties) should be located. You can select an option item or select one of the following values for the location:
- unspecified: select this to use the named property anywhere it is defined in the model. First, the current position is checked to see if the property is defined at that location, if not, then the standard algorithm is followed to see if the property is defined anywhere else in the model.
- relative: select this to use the named property at the current location.
- If you are working on a string property, then when you specify a formula, use the drop-down lists as follows:
- Choose between match and expand:
- match: use this in writing rule fragments. It provides a mechanism to compare a string to the value of a property.
- expand: use the expand function as described in Working with Display Properties.
To Modify or Remove an Attached Property
You can only modify the value of an attached property at the local level to which it is attached. To modify the name or default value, see To Modify or Delete a Property Definition.
- Click Configuration Models in the Product and Catalog Administration panel on the Comergent eBusiness System home page.
- In the Model Groups frame, navigate to the element to which the property is attached.
If the property is attached to a model:
- In the Model Groups frame, click on the model group that contains the model.
- In the Models and Groups frame, click on the model to which the property is attached.
- Click Edit in the toolbar.
If the property is attached to an option class or option item:
- In the Model Groups frame, click on the model group that contains either the model or group with the option class or option item.
- In the Models and Groups frame, click on the model or group.
- Click Edit in the toolbar.
- In the Navigation frame, find and click on the option class or option item.
- Click on the Properties tab.
This tab displays two sets of fields: one called Unattached Properties for selecting properties and defining values for them, and one called Attached Properties that shows the properties that are currently attached.
|
If the property is attached to a model, then you will see two tabs within the Properties tab: Attach and Define. The Attach tab is automatically displayed. |
- Find the property you want to modify or remove.
- Modify or remove the attached property:
- Click Save All Changes.
To Modify or Delete a Property Definition
- Click Configuration Models in the Product and Catalog Administration panel on the Comergent eBusiness System home page.
- Navigate to and select the location in the model group hierarchy where the property is defined.
- At the root model group level:
The Visual Modeler page automatically displays the root model group when you access Visual Modeler. If the root model group is not selected, then click on the root model group.
- At the model group level, navigate to and click on the model group in the Model Groups frame.
- At the model level, navigate to and click on the model group that contains the model. Then, in the Models and Groups frame, click on the model. Now click Edit Model in the toolbar.
In all of these cases, this displays the General Info tab for the group or model.
- Click on the Properties tab.
At the model group level, this displays the properties defined at that level.
At the model level, this displays two tabs: Attach and Define. Click the Define tab.
- Within the Define tab, find the property you want to modify or delete.
If the property is attached anywhere in the model group hierarchy, then you will not be able to modify the property type. If the property is attached anywhere in the model group hierarchy, then you will not be able to delete the property definition.
- Modify or delete the property definition (property type or value).
In Figure 316, PropertyA is attached to some element in the model hierarchy. Therefore, property type is read-only and the Action column has no Delete button.
- Click Save All Changes.
Name changes and value changes will be propagated to anywhere the property is attached. The value change is the default value for the property. It will not override any values set for the attached property.
Using Worksheets
This release of the Comergent eBusiness System enables you to use worksheets to maintain properties. Worksheets provide quick access to a group of properties and so you can rapidly update the properties together, rather than having to navigate to each property individually to change its value.
Each worksheet belong to a model and can be used to set the values of properties of the model. You can still set the values for properties as described in To Attach a Property.
A worksheet is a table that assigns property values to a option items:
- Rows represent option items
- Columns represent properties
For example, if you are maintaining a model of a computer, then you might have an option class for hard drives. Each hard drive option item has a number of properties such as capacity, RPM, latency, and buffer cache. You can create a worksheet like this:
TABLE 33. Hard Drive Worksheet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To Create a Worksheet
- Navigate to the model for which you want to create a worksheet.
- Click the Worksheets tab.
- Click New....
- In the New Worksheet window, enter a name for the worksheet, and click Create.
- Add the option items whose properties you want to set using this worksheet. You do this by clicking Add Row, and then navigating to each option item in turn using the entity picker window.
- Add the properties to the worksheet by clicking Add Column and in the Add Column dialog box, select each property from the drop-down list of properties defined for this model. You can create a new property by clicking New Property in the Add Column window, and then entering the new property details in the Define New Property window.
- When you have added the rows and columns for your worksheet, then you can enter values for each option item and property.
- Click Save All Changes.
To Modify a Worksheet
You cam modify a worksheet at any time. Changes to property values are effective immediately, and will be compiled with the other model details when you next compile the model.
- Navigate to the model to which the worksheet belongs.
- Click the Worksheets tab.
- Select the name of the worksheet form the drop-down list.
- Click Select.
- In the worksheet, you can do the following:
- Change the name of the worksheet: click the worksheet name and enter a new name for the worksheet.
- Add a new row: click Add Row and select option items as required.
- Move a row: click the link to the row, and select its new position from the drop-down list of rows.
- Remove a row: click the link to the row, and click Delete.
- Add a new column: click Add Column, and select the property from the drop-down list.
- Move a column: click the column name, and select its new position form the drop-down list of columns.
- Delete a column: click the column name and click Delete.
To Export a Worksheet
There are times when it is more convenient to manage the values of properties when you have the worksheet in the form of a spreadsheet that you maintain on your local machine. You can export a worksheet in the form of a comma-separated values (CSV) file, and then open this file in your preferred spreadsheet program to manage the values. You can then import the modified spreadsheet to update the values in the worksheet: see To Import a Worksheet for details on importing a worksheet.
- Navigate to the model to which the worksheet belongs.
- Click the Worksheets tab.
- Select the name of the worksheet from the drop-down list.
- Click Select.
- Click Export....
- In the File Download window, click Save.
- In the Save As window, navigate to the directory on your local machine to which you want to save the file, and then click Save.
The file is saved to your local machine.
To Import a Worksheet
When you have finished editing a spreadsheet for a worksheet, then save it as a comma-separated values (CSV) file. Follow these steps to import the worksheet into the Comergent eBusiness System.
- Navigate to the model to which the worksheet belongs.
- Click the Worksheets tab.
- Click Import....
- In the Worksheet Import window, click the Browse... button.
- In the Choose File window, navigate to and select the spreadsheet that you want to import.
- Click Open.
- In the Worksheet Import window, click Import Now.
The spreadsheet is imported into the Comergent eBusiness System.
Properties as Variables
You can evaluate the value of a property in defining rules and properties using this syntax: ${function(...)}. This enables you to define a property as a function of another property. This can be useful in defining display properties and in defining mathematical formulae for rules. For example, you can use ${expand(property[,default[,format]])} to display properties of models.
For example, suppose that you have a numerical property called "Monitor Size"defined on a series of monitors that expresses the screen size in inches and suppose that you want to present this information in a table in the form "17.00 inches". You can define a property called Display Monitor Size by "${expand("Monitor Size","n/a",0.00)} inches". Now use this new property in the display of the model and users will see the size expressed as "17.00 inches" if the underlying Monitor Size property has the value "17". Note that if the Monitor Size property is not defined, then "n/a inches" is displayed.
Comergent eBusiness System Properties
The following table summarizes the properties that are built in to the Comergent eBusiness System. Note that UI properties are covered in CHAPTER 16, Visual Modeler UI Concepts.
TABLE 34. Comergent eBusiness System Properties
|
|
|
|
|
1 if this is the first time firing rules, 0 otherwise. |
|
|
Number of copies of a model to keep in the model pool. |
|
|
"yes" or "true" turns on looping in the rule engine, causing rules to fire as long as the current state keeps changing. Since rules are removed from the rule list whenever they fire, this is not an infinite loop. |
|
|
The encoded name of another model. Encoding replaces potentially unsafe file system characters with _XXXX where XXXX is the hex representation of their Unicode character code. For example, a space is represented by "_0020". See Special Characters Encoding for more information. |
|
|
"yes" or "true" implies that when we punch into a submodel specified by the previous property we will be returning with that models BOM as a child of this model. |
|
|
Used on a model node to contain the key used to store the model in the model cache. |
|
|
The description of an item. |
|
|
Number of errors encountered during rule firing. |
|
|
String representation of a Long value, size of the XML file for a model. |
|
|
Last modified date for a model as a string (number of seconds since some important date). |
|
|
List of tab names for the model. |
|
|
The name of an option item, option class, or model. |
|
|
Properties inherited by a submodel from the parent. |
|
|
Internally used to keep track of picked items. |
|
|
Mapping of an item to an option class. |
|
|
Internally used to keep track of picked items. |
|
|
Quantity selected, if >0 the item is picked. |
|
|
Rule firing sequence, if 0 this is the first time through the loop, 1 is the second, and so on. |
|
|
Where <#> is a tab number (0...N), these properties contains the names of the root level option classes that are part of the tab whose index is <#>. |
 |
 |
|
|