Develop > Business logic layer > Workspaces support for BOD service modules > Change control metadata for business objects in workspaces


Change control metadata structure for business objects

Change control metadata describing each whether each noun or noun part is locked is added the business object document returned by Get services. The data is placed in the Show verb in the response to a BOD service, if that service module's tables are part of a workspace.


Change control metadata structure

Change control metadata uses the <_wcf:Metadata> element, with a usage attribute of changeControl.

In following XML sample of a BOD, the response to a Get service call is shown. Two catalog entry objects are returned in the DataArea element of the BOD, within the <_cat:CatalogEntry> elements.

In the ResponseCriteria section of the Show verb (also within the DataArea), two Metadata elements are returned. Each of these Metadata elements are has an ObjectReference subelement, which corresponds to the actual catalog entry objects. The modifiable property indicates whether the business object is locked or not. The workspace.name, workspace.taskGroup, and workspace.task properties correspond to the names of the Workspaces, task groups, and tasks.

<_cat:ShowCatalogEntry releaseID="" xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/9/catalog ShowCatalogEntry.xsd http://www.openapplications.org/oagis/9 ../../../../Resources/Components/Common/Meta.xsd " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:_cat="http://www.ibm.com/xmlns/prod/commerce/9/catalog" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation">     <oa:ApplicationArea xmlns:oa="http://www.openapplications.org/oagis/9">         <oa:CreationDateTime>             2008-02-05T16:40:40.078Z
        </oa:CreationDateTime>     </oa:ApplicationArea>     <_cat:DataArea>         <oa:Show recordSetCompleteIndicator="true" recordSetReferenceId="xxxxxxxx" recordSetTotal="2" recordSetCount="2" recordSetStartNumber="1">             <_wcf:ResponseCriteria>                 <_wcf:Metadata usage="changeControl">                     <_wcf:ObjectReference>/Catalog[1]</_wcf:ObjectReference>                     <_wcf:Property name="modifiable">true</_wcf:Property>                     <_wcf:Property name="logonID">wcsadmin</_wcf:Property>                     <_wcf:Property name="workspace.name">Spring Catalog</_wcf:Property>                     <_wcf:Property name="workspace.taskGroup">Update product descriptions</_wcf:Property>                     <_wcf:Property name="workspace.task">Jackets</_wcf:Property>                 </_wcf:Metadata>                 <_wcf:Metadata usage="changeControl">                     <_wcf:ObjectReference>/Catalog[2]</_wcf:ObjectReference>                     <_wcf:Property name="modifiable">false</_wcf:Property>                     <_wcf:Property name="logonID">wcsadmin</_wcf:Property>                     <_wcf:Property name="workspace.name">Spring Catalog</_wcf:Property>                     <_wcf:Property name="workspace.taskGroup">Update product descriptions</_wcf:Property>                     <_wcf:Property name="workspace.task">Shoes</_wcf:Property>                 </_wcf:Metadata>             </_wcf:ResponseCriteria>         </oa:Show>         <_cat:CatalogEntry>             <_cat:CatalogEntryIdentifier>                 <_wcf:UniqueID>1234</_wcf:UniqueID>             </_cat:CatalogEntryIdentifier>         </_cat:CatalogEntry>         <_cat:CatalogEntry>             <_cat:CatalogEntryIdentifier>                 <_wcf:UniqueID>4321</_wcf:UniqueID>             </_cat:CatalogEntryIdentifier>         </_cat:CatalogEntry>     </_cat:DataArea>
</_cat:ShowCatalogEntry>


Access the metadata

You can access the metadata in the BOD using Java code, but for JSP pages, it is easier to access it through the WebSphere Commerce foundation tag library, using the metadata tag.


Related tasks

Enable workspaces support for a custom table in an existing WebSphere Commerce BOD service module

Enable change control for a noun

Enable change control for a noun part

Include change control information in the response of a Get service


+

Search Tips   |   Advanced Search