Understanding the steps in DocumentObj Update method
Describes the different steps in DocumentObj Update method
The following flow describes the main steps and checks when updating a content object (logical, version and language).
Validate incoming parameters
During this step the following checks are executed:- All required parameters are present
- All parameters contain a valid value. In order to check this, the incoming language is converted into a LovValue.
- No system fields are supplied
Retrieve the object
- If no object could be found, an
InvalidObjectexception is thrown. - If an object is found, the current user must have write acces. Otherwise an
ObjectIsReadOnlyexception is thrown.
- If no object could be found, an
-
Preprocessing of the blob (if a blob is submitted):
- Convert the incoming EDT into a database object. If the EDT cannot be found, an
InvalidObjectexception is thrown. - If the blob is an xml
- Resolve the DTD using the catalog
- Check that the processing instruction corresponds with the current object
- Convert the incoming EDT into a database object. If the EDT cannot be found, an
Initialize the plugin engine
- Find the Plugin Configuration Xml
- Conditionally filter the Plugin Configuration Xml using the following conditions:
ConditionName Condition on... Example ISHType ISHMasterDoc, ISHModule, ISHLibrary, ISHIllustration, ISHTemplate FMAPID The unique identifier of the logical level (= LogicalId) VERSION The version number 1.1.1 DOC-LANGUAGE The language fr FSOURCELANGUAGE The source language en FRESOLUTION The label of the resolution Low EDT The EDT specified on the output format EDTXML ISHUserGroup The element name of the usergroup VUSERGROUPSYSTEMMANAGEMENT CurrentAction The current action Update, Checkin, SetMetadata, CheckOut and UndoCheckOut ISHLevel The level
logical, version, lng - Initialize the plugins
Start the transaction and lock all involved objects
Retrieve all metadata
During this step all metadata - which is required in one of the following steps - is retrieved including all metadata which is required for running one of the plugins.
Check the current metadata
- Check that the current values match the values specified in the required current metadata
- If the object is checked-out, it must be checked out by the current user
- There must be at least one valid status transition for the current user
- When submitting a blob, the object cannot be 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, the following checks are executed:
- Check that the object is not checked by anyone
- Check that the status transition is valid
Run the plugins
All plugins are executed in order specified in the Plugin Configuration Xml
-
If the language is updated:
- Check that the object does not contain a xml. Language Applicability is only allowed for non xml objects like illustrations.
- Check that you are not changing all languages and that you are not adding a language which is already present for the current version
-
If the status is updated:
- Since the plugins can change the metadata, all the checks from step 10 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