Processing Management Center services
Processing Management Center services involves transforming URL requests into Process BODs and Change BODs.
It is sometimes difficult to determine whether
a URL will be transferred to a Process service or a Change service.
In general, when working with primary objects, such as a product,
URLs are transferred to a Process service, and when working with secondary
objects, such as a product description, URLs are transferred to a
Change service. For example, adding a product transfers to a Process
service with an actionCode
of Add
,
but adding a product description is a Change service with an actionCode
of Add
and
an actionExpression
that points to the description.
An actionExpression
is
an element that represents a processing instruction that pertains
to the request. The actionCode
attribute indicates
the operation, while the value points to the element to apply the
action expression to.
An actionCode
is a URL
parameter that indicates the type of action to be performed on the
Noun or Noun part. Valid values are Add and Delete. For more information
about actionCodes
and actionExpressions
,
see and Transforming URL requests into Change BODs.
- contextParameters
- Optional: A comma separated list of the URL parameters that represent information placed in the business context area of the request. Unless the colon override is specified, the name of the context parameter is the URL parameter. For example, if masterCatalogId:catalogId is specified, the URL parameter value of masterCatalogId is used, but the context parameter name is catalogId. If storeId is specified, the URL parameter and context name are storeId.
- documentRootFactory
- The factory that is used to create the BOD object. For example, com.ibm.commerce.catalog.facade.datatypes.CatalogFactory.
- var
- The array variable that contains the BOD objects from the WebSphere Commerce server to be used in the response JSP file. For example, catalogEntries.
- verb
- The verb of the BOD documentRootFactory.
- clientLibrary
- The class name of the client library to invoke.
- clientLibraryMethod
- The method to invoke on the client library to initiate the service request.
- actionCode
- The actionCode of the request. If this is not specified, the URL request must specify the actionCode as a URL parameter.
- defaultParameters
- A list of parameters in query string format.
<action path="/CreateCatalogEntryDescription" parameter="CatalogEntryDescription"
type="com.ibm.commerce.foundation.client.facade.bod.servlet.struts.BusinessObjectDocumentAction"
className="com.ibm.commerce.foundation.client.facade.bod.servlet.struts.BusinessObjectDocumentActionMapping">
<set-property property="contextParameters"1
value="storeId,langId,masterCatalogId:catalogId" />
<set-property property="verb"4 value="Change" />
<set-property property="documentRootFactory"2
value="com.ibm.commerce.catalog.facade.datatypes.CatalogFactory" />
<set-property property="clientLibrary"5
value="com.ibm.commerce.catalog.facade.client.CatalogFacadeClient" />
<set-property property="clientLibraryMethod"6
value="changeCatalogEntry" />
<set-property property="actionCode"7 value="Change"/>
</action>
<action path="/CreateCatalogEntry" parameter="CatalogEntry"
type="com.ibm.commerce.foundation.client.facade.bod.servlet.struts.BusinessObjectDocumentAction"
className="com.ibm.commerce.foundation.client.facade.bod.servlet.struts.BusinessObjectDocumentActionMapping">
<set-property property="contextParameters"
value="storeId,langId,masterCatalogId:catalogId" />
<set-property property="verb" value="Process" />
<set-property property="documentRootFactory"
value="com.ibm.commerce.catalog.facade.datatypes.CatalogFactory" />
<set-property property="clientLibrary"
value="com.ibm.commerce.catalog.facade.client.CatalogFacadeClient" />
<set-property property="clientLibraryMethod"
value="processCatalogEntry" />
<set-property property="actionCode" value="Create"/>
<set-property property="var"3 value="catalogEntries" />
<forward name="success" path="/jsp/commerce/catalog/restricted/RespondCreateCatalogEntry.jsp"/>
</action>
<plug-in
className="com.ibm.commerce.foundation.client.facade.bod.servlet.struts.BusinessObjectDocumentPlugInImpl">
<set-property property="config"
value="/WEB-INF/config/<custom-component>/wc-config-clientobjects.xml" />
</plug-in>
After registering the Struts actions, you must configure the mapping between the URL parameters and the BOD Nouns. For more information about configuring this mapping, see Processing Management Center services by transforming URL requests into BODs.