For authoring tools that use ENS to name documents, you can create a set of documents in SmartPlant Foundation at the plant level or higher configuration level, relate them to a specific PBS node, and use them when publishing from an authoring tool. The documents allocated at a higher configuration are available in the lower configuration for tool selection.
These documents are created in SmartPlant Foundation as placeholders, meaning that their names are reserved in the SmartPlant Foundation database. The document allocation is available for all publishable document types and these documents can be related to the PBS nodes.
These documents must be of a user-defined class definition and must realize the ISPFDocument interface definition.
The document names can include properties, such as the document type or the PBS node that the document is related to. The name is configured using an Engineering Number System (ENS) definition. For more information about ENS definitions, refer to Configure the Engineering Numbering System (ENS).
When a tool is ready to create a document, it contacts SmartPlant Foundation for a name that has been reserved for use by authoring tools. You can select one or more document names, based on the document type or the PBS node. Once a tool starts using the name, it notifies SmartPlant Foundation so that the document name can be marked as reserved for this tool and not available for selection by another authoring tool.
Create the schema for documents reserved for use in authoring tools
Because this functionality is only supported for custom class definitions, you must create and load a new class definition for documents that will be reserved for tools in SmartPlant Foundation for allocation to the authoring tools.
Your custom class definition must realize the following interface definitions.
-
ISPFTEFENSGenerated
-
ISPFDocument
Additional interfaces are optional.
ISPFTEFENSGenerated interface
A custom class definition for reserved documents to be allocated to the authoring tools over the course of the project must realize the ISPFTEFENSGenerated interface, as this is the only way to recognize the documents that are created for integration purpose. We strongly recommend that only one class definition realize this interface. Otherwise, it is not possible to identify the reserved documents created for integration.
The SPFTEFRelatedObjectNameCriteria property is exposed on this interface, and is set while creating the document reserved for authoring tools. The software evaluates this property value while relating a published document master with the document reserved by the tool.
Property value |
Description |
---|---|
MatchFullName |
Relates the published document master with the document reserved by the tool only if they both have the same name. This value is the default. |
MatchPrefix |
Relates all the published document masters only if the name prefix matches the name of the document reserved by the tool. |
MatchSuffix |
Relates all the published document masters only if the name suffix matches the name of the document reserved by the tool. |
For more information about the relationship definitions used, see Interface and relationship definitions used with central document allocation.
ISPFDocument interface
You must realize the ISPFDocument interface to have the SPFDocCategory, SPFDocType, SPFDocState and other document properties on the documents reserved for authoring tools. SPFDocCategory or SPFDocType can be a part of the ENS definition defined for the custom class definition so that these properties are a part of the document name.
The SPFDocState property on these documents is used to differentiate between the documents that are in use and available.
While creating a new document of this custom type, set the document issue state (SPFDocState) as RESERVED_INACTIVE. This means that it is not in use and available for other authoring tools to use.
After a document is selected by a tool and the tool notifies SmartPlant Foundation that it is using this document, the software changes the SPFDocState of the document to RESERVED. This means that it is not available for selection.
IPBSItem interface
If you want to relate the document to a PBS node, realize the IPBSItem interface. The related PBS node can be a part of the document name using the ENS definition.
ISPFClassifiedItem interface
If you want to create a new document of this kind from the document classification tree and want to create different ENS definitions for different document categories, the class definition must realize the ISPFClassifiedItem interface.
You can configure a different ENS definition for each document category, so that each document category can have its own criteria for naming documents reserved for authoring tools. To do so, you must:
-
Create different ENS definitions for each document category.
-
Relate all the ENS definitions to the new class definition.
While creating a document from the document classification, the system identifies the ENS definition for the selected document classification and creates the document name accordingly. For more information on the methods that the authoring tools use to request the document names reserved for use by tools in SmartPlant Foundation, see Methods used in central document allocation.
The relationships and statuses of reserved documents change as users work with related documents. For example:
When |
And the software |
Then |
---|---|---|
A user publishes or revises a document that is not related to a document reserved for use by tools |
Finds a match based on the document names |
The published or revised document is related to the matching document reserved for use by tools. |
A user renames a published document |
Finds a relationship with a document reserved for use by tools |
The software validates the new document name, and:
|
A user terminates a published document |
The relationship with the document reserved for use by tools is also terminated. |
|
A document that is reserved for use by tools is not related to any published document |
The software changes the status of the document reserved for use by tools to CANCELLED. |
You can override the status of the document by overriding the UpdateDocumentStatus method provided on the ISPFTEFENSGenerated interface. For more information, see ISPFTEFENSGenerated interface.