Steps in the DocumentObj Create method
Invoking the DocumentObj Create method creates a content object (logical, version and language) by performing a number of steps.
Here are the steps that the
DocumentObj Create method executes when invoked:
- Validate all incoming parameters by verifying the following:
- All required parameters are present.
- No system fields have been supplied.
- All parameters contain a valid value.
- Initialize the folder (if provided).
- Validate that the incoming folder exists and has the correct folder type.
- Retrieve and temporarily store the folder's security fields.
- Validate the incoming logical identifier:
- If none is provided, generate a new logical identifier with a new GUID.
- If a logical identifier is provided, check whether the logical object already exists.
- Verify that the user has write access to the folder or logical object.
- Start the transaction.
- Initialize the logical object (in memory):
- If the logical object does not yet exist, create it (in memory). Copy the security fields from the folder.
- Otherwise, initialize all necessary metadata.
Initialize the version object (in memory):
- If the version object does not exist, create it (in memory).
- Otherwise, initialize all necessary metadata.
- Create the language object (in memory):
- Check the initial status.
- Create the revision object and set the blob-related fields.
- 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 at the logical level GUID-10FFE1D1-EDE2-4F92-BAB5-66B546607868VERSIONThe 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 CreateISHLevelThe level logical,version,lng - Initialize the plugins.
- Retrieve the metadata used by the plugins.
- Run the plugins in the order specified in the Plugin Configuration XML.
- Check the initial status and set the status type.
- Validate that there are not multiple languages provided when submitting XML.
- 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.
- Stream the blob to the database.
When creating a new logical object,:
- Lock the parent folder.
- Retrieve the folder security fields, check that the values match the ones stored in step 4.
- Link the logical object with the parent folder.
Start any background tasks that the plugins wanted to start.
Commit the transaction.