Documentation Center

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).

  1. 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
  2. Retrieve the object

    • If no object could be found, an InvalidObject exception is thrown.
    • If an object is found, the current user must have write acces. Otherwise an ObjectIsReadOnly exception is thrown.
  3. Preprocessing of the blob (if a blob is submitted):
    • Convert the incoming EDT into a database object. If the EDT cannot be found, an InvalidObject exception is thrown.
    • If the blob is an xml
      • Resolve the DTD using the catalog
      • Check that the processing instruction corresponds with the current object
  4. Initialize the plugin engine

    • Find the Plugin Configuration Xml
    • Conditionally filter the Plugin Configuration Xml using the following conditions:
      ConditionNameCondition on...Example
      ISHType ISHMasterDoc, ISHModule, ISHLibrary, ISHIllustration, ISHTemplate
      FMAPIDThe unique identifier of the logical level (= LogicalId) 
      VERSIONThe version number1.1.1
      DOC-LANGUAGEThe languagefr
      FSOURCELANGUAGEThe source languageen
      FRESOLUTIONThe label of the resolutionLow
      EDTThe EDT specified on the output formatEDTXML
      ISHUserGroupThe element name of the usergroupVUSERGROUPSYSTEMMANAGEMENT
      CurrentActionThe current actionUpdate, Checkin, SetMetadata...
      ISHLevel

      The level

      logical, version, lng
    • Initialize the plugins
  5. Start the transaction and lock all involved objects

  6. 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.

  7. 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
  8. If a blob is submitted, create the new object and set all blob related fields (in memory)

  9. Set all metadata fields (in memory)

  10. 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
  11. Run the plugins

    All plugins are executed in order specified in the Plugin Configuration Xml

  12. 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
  13. 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)
  14. Update the information in the database:
    • Set the new metadata
    • Link the language with the new blob
    • Stream the blob to the database
  15. Start the background tasks from the plugins

  16. Commit the transaction