Transforming URL requests into change BODs
When a Management Center user changes an object, such as by adding a product description, the Management Center web application transforms the URL request for the change into a change BOD
Noun part creation
The ActionExpression
in a change verb applies to the changeable parts within a
noun. To transform an URL request into a change BOD, you must identify the changeable noun parts.
After you identify these parts, use the noun definition to build the change verb correctly. The noun
definition describes the nouns and noun elements in the noun configuration. The noun configuration
includes the noun name, and the factory and method to use for creating an object. If a factory is
not specified, the default factory is used.
The noun configuration also includes noun elements that declare the noun changeable parts and the supporting overlays on the noun elements. If no noun elements are declared, the default objects are used and the noun is considered to not have any identified changeable parts. The noun element configuration determines whether the element is considered a changeable part. The configuration also declares the factory class and method that are used to create the object when an overlay is used. By default, if the noun element is not configured, it is not considered a changeable part and the default object is used. The noun element configuration is required only for identifying the changeable parts or declaring a new factory class and method for creating an object. When you define nouns and noun elements, the identified changeable noun parts and the factory class, if declared, are registered when the change request is built.
When an element or attribute is set for an identified changeable part, an
ActionExpression
that points to that part of the noun is created and added to the
change verb. Based on this configuration, any time that this element is populated, it is added to a
set of XPaths that must be added for the change actions. After the noun is populated, a set of
ActionExpressions
is created and associated as part of the change verb. Each
changeable part of the populated noun has an associated ActionExpression
. The
result is a populated noun and a corresponding change verb that contains all of the change
instructions for the change request.
Change verb creation
actionCode
is
used to define the action code that must be part of the action expression. The URL to change verb
transformation includes the following characteristics: - The
actionCode
that is specified applies to all the parts of a particular noun. Although the change request can change multiple noun parts and each action expression can have a different action code, theactionCode
for the noun applies to all action expressions for that noun. This is a limitation of the mapping of theactionCode
for building the change service request. - The
actionCode
parameter value cannot be multi-valued. If multiple values are specified, only the first value is used. This characteristic is different than process verbs, which can include multiple values for theactionCode
parameter.
Example
The following URL request includes multiple parameters, including thecatentryId
, partNumber
, name
, and
actionCode
parameters.
https://localhost/webapp/wcs/cmc/servlet/ChangeCatalogEntry.do?catentryId=10259&partNumber=FUOF01
&language=en_US&ownerId=7000000011name=Mahogany+Desk+Chair&actionCode=Add
...
When the URL request is transformed into a change BOD, the following object model XML can be
created.
[...]
<oa: ActionExpression actionCode="Add">
/CatalogEntry[1]/Description
[...]