Transforming URL requests into Change BODs
The Management Center Web application transforms an URL request into a Change BOD when a Management Center user changes an object, for example, adding a new product description.
Step 1: Creating the Noun parts
The ActionExpression
in
a Change verb applies to the changeable parts that are identified
within a
Noun. To transform an URL request into a Change BOD, you must identify
the
changeable parts of the Noun. After you identify these parts, use
the Noun
definition to identify these changeable parts to build the Change
verb correctly.
The Noun definition describes the Nouns and Noun elements that are
defined
in the Noun configuration. The Noun configuration contains the name
of the
Noun, as well as the factory and method to use to create the object.
If a
factory is not specified, then the default factory is used.
The Noun configuration also includes Noun elements that declare the changeable parts of the Noun and the supporting overlays on the elements of the Noun. 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 if the element is considered a changeable part and optionally 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 only required when identifying the changeable parts or declaring a new factory class and method used to create the object. When you define Nouns and Noun elements, both the identified changeable parts of a Noun and the factory class that is used to create the object when an overlay is used are registered when building the Change request.
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
has been 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 end
result is
a populated Noun and a corresponding Change verb that contains all
of the
Change instructions for the Change request.
Step 2: Creating the Change verb
To create the Change
verb, a special URL parameter called actionCode
is
used to
define the action code that must be part of the action expression.
URL to Change verb transformation has the following characteristics:
- The
actionCode
specified applies to all the parts of a particular Noun. Although the Change request can change multiple parts and each action expression can have a different action code, this scheme assumes that theactionCode
for the Noun applies to all action expressions for that Noun. This is a limitation of the mapping scheme ofactionCode
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, in which theactionCode
can be multi-valued.
Example
For example, the following URLhttps://localhost/webapp/wcs/cmc/servlet/ChangeCatalogEntry.do?catentryId=10259&partNumber=FUOF01&language=en_US&ownerId=7000000011name=Mahogany+Desk+Chair&actionCode=Add...
converts to this section of the BOD: [...]
<oa: ActionExpression actionCode="Add">
/CatalogEntry[1]/Description
[...]