IBM Content Navigator, Version 2.0.3     Supports: 

Request modes

When an item is created or modified in the web client, IBM® Content Navigator calls the POST method for the particular object type resource to submit a request to the external data service. This request payload contains a request mode that indicates the action that is being performed.

You must configure the external data service to respond with the data that is required for that action. For example, if the request is to add a document, when the Add Document wizard is opened, the service needs to respond with the initial property values that are defined for the Add Document class.

The requestMode parameter indicates the action that is being performed in IBM Content Navigator. This action determines the response that is returned by the external data service.

For input payloads, the following values are provided on the context ID:
Table 1. Values provided on the context ID for input payloads
Value Description
userid The user ID for the user who is logged in to IBM Content Navigator.
locale The locale of the browser that initiated this call to the external data service.
desktop The desktop ID for the desktop that is in use.
The requestMode parameter can have the following values:
initialNewObject
Indicates that a new object is being created. For each property, the input payload contains the symbolic name and the default value that is defined in the repository.

The initialNewObject request mode is called only for the first object that is added of a particular class. The EDS information that is returned from the initialNewObject request is used when adding subsequent documents of the same class.

initialExistingObject
Indicates that an existing object is being edited. For each property, the input payload that is passed to the service contains the symbolic name and the value that is currently stored in the repository.

The input payload also contains the objectId parameter that specifies the globally unique identifier (GUID) or persistent identifier (PID) of the content item that is being edited. The service can use the GUID to refer to the content item. However, remember that the values stored in the repository for the class can change. Therefore, the values that are provided in the input payload might not match the values that are currently stored in the repository for the class.

The input payload does not contain the externalDataIdentifier parameter. Instead, this parameter is set by the external data service and returned in the response payload. Subsequent requests made during the update of the class include the externalDataIdentifier parameter to indicate the current state of the data to the service.

inProgressChanges
Indicates that the external data service is being called in response to changes in one or more properties that have dependent properties.
This request mode is called before any changes take effect when the user changes property values. This call happens only in cases where dependent properties are being used by the EDS.
The input payload can contain the following information:
  • The current working value for each property in the class or item type
  • The externalDataIdentifier parameter, which indicates to the service the previous state of any properties that it updated
  • For an existing class, the objectId parameter, which specifies the GUID or the PID of the content item that is being edited

The external data service responds to this request if the attributes or working value of any property that it manages changed. The service also responds to return a custom validation error.

finalNewObject
Before the object is persisted in the repository, this value indicates that the external data service is being called for the final time in the sequence of exchanges to create the object. After this call, the new object is created and the property values are persisted in the repository.

For each property, the input payload that is passed to the service contains the working values for all properties that are defined by the class.

finalExistingObject
Indicates that the external data service is being called for the final time in the sequence of exchanges to update an existing property. After this call, the updated property values are persisted in the repository.

For each property, the input payload that is passed to the service contains the working values for all properties that are defined by the class or item type.