Understanding the steps in PublicationOutput SetMetadata method

This concept describes the different steps in PublicationOutput SetMetadata method

The following flow describes the main steps and checks when updating a publication object (logical, version and language).

  1. Validate incoming parameters

    During this step the following checks are executed:
    • All required parameters are present
    • No system fields are supplied
    • All parameters contain a valid value
    • In order to check this, the incoming output format and language combination are converted into lists with LovValue items.
  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. Initialize the plugin engine

    • Find the Plugin Configuration Xml
    • Conditionally filter the Plugin Configuration Xml using the following conditions:
      ConditionNameCondition on...Example
      ISHType ISHPublication
      FMAPIDThe unique identifier of the logical level (= LogicalId) 
      VERSIONThe version number1.1.1
      FISHPUBLNGCOMBINATIONThe language combinationen+fr
      DOC-LANGUAGEThe individual languages used in the language combinationfr
      FISHOUTPUTFORMATREFThe label of the output formatPDF (A4 Manual)
      EDTThe EDT specified on the output formatEDTPDF
      ISHUserGroupThe element name of the usergroupVUSERGROUPSYSTEMMANAGEMENT
      CurrentActionThe current actionSetMetadata
      ISHLevel

      The level

      logical, version, lng
    • Initialize the plugins.
  4. Start the transaction and lock all involved objects
  5. Retrieve all metadata
  6. Check the current metadata
    • Check that the current values match the values specified in the required current metadata
  7. Set all metadata fields (in memory)
  8. Execute the following checks on the publication output object:
    • If publication output object is released, updating language-level metadata is not allowed, an ObjectIsReleased exception is thrown
    • If publication output object is publishing or pending publishing, updating language-level metadata is not allowed, an InvalidStatusForAction exception is thrown
    • If the status is updated, check that the status transition is valid
  9. Run the plugins

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

  10. Execute the following checks (again) on the publication output object:
    • If publication output object is released, updating language-level metadata is not allowed, an ObjectIsReleased exception is thrown
    • If publication output object is publishing or pending publishing, updating language-level metadata is not allowed, an InvalidStatusForAction exception is thrown
    • If status is not "To Be Published" and status is not updated, and another field than status is updated on the language level, change the status to "Out-of-date"
    • If any of the fields that affect content of the publication have been updated on the version level
      • If the publication version is released, an ObjectIsReleased exception is thrown
      • Otherwise, every publication output object is moved to "Out-of-date" status
    • If the status is updated, check that the status transition is valid
  11. If the publication version is updated...
    • Check if any of the key publication fields is updated:
      • FISHBASELINE
      • FISHMASTERREF
      • FISHRESOURCES
      • FISHPUBCONTEXT
      • FISHREQUIREDRESOLUTIONS
      • FISHPUBSOURCELANGUAGES
      • ...
    • If any of the key publication fields is updated and the publication is already released, an ObjectIsReleased exception is thrown
    • If any of the key publication fields is updated and the publication is not released, mark all publication output objects as "Out of date"
  12. If publication output object is moved from "Publishing" status to any other status:
    • Set the publication end date to the current date
  13. If publication output object is moved to...
    • "Pending"
      • Set Publisher to the current user
    • "Publishing"
      • Set the publication start date to the current date
      • Reset the publication end date
      • Set Publisher to the current user
    • "Cancelled"
      • Check that user that is requesting the cancel is a publisher.
      • Reset the publication start date
      • Reset the publication end date
      • Reset the "Event Id" field
    • "Released"
      • If the baseline is not frozen, BaselineNotReleased exception is thrown
      • Set "Is Released" field to Yes
      • Set the publication end date to the current date
      • Set the status type to "Released"
  14. Update the information in the database:
    • Set the new metadata
  15. If publication output object is moved to "Pending":
    • Trigger the publishing process in the background
    • Set "Event Id" field to the publishing event id
  16. Start the background tasks from the plugins
  17. Commit the transaction