Steps in the DocumentObj Update method
Invoking the DocumentObj Update method updates a content object (logical, version and language) and results in a number of steps being performed.
Here are the steps that the
DocumentObj Update method executes when invoked:
- Validate all incoming parameters by verifying the following:
- All required parameters are present.
- All parameters contain a valid value.
- No system fields are supplied.
Retrieve the object:
- If no object could be found, an
InvalidObjectexception is thrown. - If an object is found and the current user does not have write access, an
ObjectIsReadOnlyexception is thrown.
- If no object could be found, an
-
Preprocess the blob (if a blob is submitted):
- Convert the incoming EDT into a database object.
- If the blob is XML content:
- Resolve the DTD using the catalog.
- Check that the processing instruction corresponds with the current object.
- Convert the incoming EDT into a database object.
Initialize the plugin engine:
- Find the Plugin Configuration Xml,
- Conditionally filter the Plugin Configuration Xml using the following conditions:
ConditionName Condition on... Example ISHTypeThe InfoSharetype of the objectISHMasterDoc,ISHModule,ISHLibrary,ISHIllustration,ISHTemplateFMAPIDThe unique identifier of the logical level (= LogicalId)VERSIONThe version number 1.1.1 DOC-LANGUAGEThe language frFSOURCELANGUAGEThe source language enFRESOLUTIONThe label of the resolution LowEDTThe EDT specified on the output format EDTXMLISHUserGroupThe element name of the usergroup VUSERGROUPSYSTEMMANAGEMENTCurrentActionThe current action Update,Checkin,SetMetadata,CheckOutandUndoCheckOutISHLevelThe level logical,version,lng - Initialize the plugins,
- Start the transaction and lock all involved objects.
- Retrieve all metadata that is required by any of the following steps, including all metadata that is required for running any of the plugins.
- Check that the current values match the values specified in the required current metadata.
- Verify the following:
- If the object is checked out, it is checked out by the current user.
- The current user has at least one valid status transition available.
- When submitting a blob, the object is not part of a released publication output with the current language.
If a blob is submitted, create the new object and set all blob related fields (in memory),
Set all metadata fields (in memory).
-
If the status is updated, verify the following:
- The object is not checked out by anyone.
- The status transition is valid.
- Run the plugins in the order specified in the Plugin Configuration Xml.
-
If the language is updated, verify the following:
- The object does not contain XML. Language Applicability is only allowed for non-XML objects like illustrations.
- The method is not changing all languages and is not adding a language that is already present for the current version.
-
If the status is updated:
- Since the plugins can change the metadata, all the checks from step 11 are executed again.
- Update the status type (if necessary),
- When changing the status from "Released" to "Draft", check that the object is not part of a released publication output with the current language.
- Start translation management (if necessary).
-
Update the information in the database:
- Set the new metadata.
- Link the language with the new blob.
- Stream the blob to the database.
Start the background tasks from the plugins.
Commit the transaction.