Understanding the steps in PublicationOutput Create method
Describes the different steps in PublicationOutput Create method
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.
Initialize the folder (if provided)
Validate the incoming folder upon existence and correctness of folder type
Retrieve the folder security fields and temporary store the security fields
Validate the incoming LogicalId
- If no LogicalId is provided, a new LogicalId is generated using a new GUID
- If a LogicalId is provided, check whether the logical object already exists or not
- Check that the user has write access to the folder or logical object
Start transaction
- If the logical object exists, the logical object is locked
Initialize logical object (in memory)
- If the logical object does not exist, create the logical object (in memory) . Copy the security fields from the folder
- Otherwise, initialize all necessary metadata
Initialize version object (in memory)
- If the version object does not exist, create the version object (in memory)
- If the baseline is not provided, create a new baseline.
- If the previous version of the publication output exists, create a copy of the baseline
- Otherwise, create an empty baseline
- If the baseline complete mode is not provided, initialize the baseline complete mode with the default value (VBASELINECOMPLETEMODELATESTAVAILABLE)
- If the baseline is not provided, create a new baseline.
- Otherwise, initialize all necessary metadata
- If the version object does not exist, create the version object (in memory)
Create the language object (in memory)
- If the status is not provided, initialize the status with the default value (VPUBSTATUSTOBEPUBLISHED)
- Create the revision object and set the blob related fields
- Check the initial status and set the status type
Initialize the plugin engine
- Find the Plugin Configuration Xml
- Conditionally filter the Plugin Configuration Xml using the following conditions:
ConditionName Condition on... Example ISHType ISHPublication FMAPID The unique identifier of the logical level (= LogicalId) VERSION The version number 1.1.1 FISHPUBLNGCOMBINATION The language combination en+fr DOC-LANGUAGE The individual languages used in the language combination fr FISHOUTPUTFORMATREF The label of the output format PDF (A4 Manual) EDT The EDT specified on the output format EDTPDF ISHUserGroup The element name of the usergroup VUSERGROUPSYSTEMMANAGEMENT CurrentAction The current action Create ISHLevel The level
logical, version, lng - Initialize the plugins.
- Retrieve the metadata used by the plugins
Run the plugins
- All plugins are executed in order specified in the Plugin Configuration Xml
- If the plugin fails, an
ErrorRunningPluginexception is thrown. This exception always wraps the exception which is thrown by the plugin itself.
- Check the initial status and set the status type
-
Update the information in the database:
- Create all objects and set the new metadata
- Link the version object with the logical object
- Link the language object with the version object
- Link the language with the new revision object
When creating a new logical object...
- Lock the parent folder
- Retrieve the folder security fields, check that the values match the ones stored in the step 2
- Link the logical object with the parent folder
- Start the background tasks from the plugins
- Commit the transaction