This chapter discusses
Updating a configuration.
Elements and attributes
Choices
Choices and Response
See Also
Retrieving Configuration Information
The Configurator XML interface lets you update a configuration by making choices—that is, by selecting a domain member for a single-select decision point, or one or more domain members for a multi-select decision point, or entering one or more values for an external variable.
To select a domain member using COP XML, the request must include:
A CHOICES element.
The child element CH for each domain member that you want to select.
These attributes of the child element CH:
DP—The name of the decision point for the domain member you want.
DM—The name of the domain member you want.
BY—Indicates that the choice is made by the user (U).
QTY—The number of copies of the domain member you want.
To enter values for external variables using COP XML, the request must include:
A CHOICES element.
The child element EVCH for each external variable that you want to enter a value(s) for.
These attributes of the child element EVCH:
DP—the name of the decision point for the external variable you want.
VAL—the value you want to set on the external variable.
Note. You must enter a separate VAL attribute for each of the values you want to set on the external variable.
Note. The Configurator is stateless. Each request must include all user choices.
The COP XML request may include these elements and attributes to update a configuration.
CONFIGURATION MODEL_ID LOCALE MODEL_VERSION COMPILE_VERSION TOTAL_PRICE CHOICES RET CH DP DM BY QTY EVCH DP VAL
The COP XML response may include these elements and attributes to return information about a configuration.
CONFIGURATION MODEL_ID LOCALE MODEL_VERSION COMPILE_VERSION TOTAL_PRICE CHOICES CH DP DM BY ST SL EL QTY EVCH DP VAL TY
The RET attribute of the CHOICES element lets you control whether the COP returns a response when you choose one or more domain members.
By default, including in the REQUEST the CHOICES element also includes the element’s RET attribute with its value set to “false".
As mentioned above, a CHOICES request to update the configuration must also include, as a child element of the CHOICES element, EITHER the CH element with valid values for:
The DP attribute
The DM attribute
The BY attribute
The QTY attribute
OR the EVCH element with valid values for:
The DP attribute
The VAL attribute(s)
For example, these requests are, in effect, the same:
REQUEST 1 (RET not set):
<CONFIGURATION MODEL_ID="Sample" MODEL_VERSION=""> <CHOICES> <CH DP="PrintersSelection" DM="HP Laserjet" BY="U" QTY="1"/> </CHOICES> </CONFIGURATION>
REQUEST 2 (RET set to an empty string):
<CONFIGURATION MODEL_ID="Sample" MODEL_VERSION=""> <CHOICES RET=""> <CH DP="PrintersSelection" DM="HP Laserjet" BY="U" QTY="1"/> </CHOICES> </CONFIGURATION>
REQUEST 3 (RET set to “false")
<CONFIGURATION MODEL_ID="Sample" MODEL_VERSION=""> <CHOICES RET="false"> <CH DP="PrintersSelection" DM="HP Laserjet" BY="U" QTY="1"/> </CHOICES> </CONFIGURATION>
Each of these requests—REQUEST 1, 2, and 3—updates the configuration by making a user choice of one copy of the HP Laserjet for the printer’s decision point. None of the requests cause the COP to return a RESPONSE.
Note. The Configurator is stateless. Each request must include all user choices.
Including in the REQUEST the CHOICES element with the RET attribute set to “true” causes the COP to return in the RESPONSE:
Every non-null attribute-value pair for every choice (pick) of a domain member in the configuration. The attributes of a domain member (DM) that may be returned are:
DP
DM
BY
QTY
ST
SL
EL
TY
Every non-null, attribute-value pair for every external variable in the configuration.
The attributes of an external variable that may be returned are:
DP
VAL
TY
For example:
REQUEST |
RESPONSE |
(Without the CH child element)
|
|
(With the CH element PrintersSelection)
|
|
(With the CH element BaseSelection)
|
|
Note. The Configurator is stateless. Each request must include all user choices.