Professional Documents
Culture Documents
Version 2009 R4
August 2012
DSPF1-PE-200128A
Copyright
Copyright © 2012 Intergraph Corporation. All Rights Reserved.
Including software, file formats, and audiovisual displays; may be used pursuant to applicable software license agreement;
contains confidential and proprietary information of Intergraph and/or third parties which is protected by copyright law, trade
secret law, and international treaty, and may not be provided or otherwise made available without proper authorization from
Intergraph Corporation.
U.S. Government Restricted Rights Legend
Use, duplication, or disclosure by the government is subject to restrictions as set forth below. For civilian agencies: This was
developed at private expense and is "restricted computer software" submitted with restricted rights in accordance with
subparagraphs (a) through (d) of the Commercial Computer Software - Restricted Rights clause at 52.227-19 of the Federal
Acquisition Regulations ("FAR") and its successors, and is unpublished and all rights are reserved under the copyright laws of
the United States. For units of the Department of Defense ("DoD"): This is "commercial computer software" as defined at DFARS
252.227-7014 and the rights of the Government are as specified at DFARS 227.7202-3.
Unpublished - rights reserved under the copyright laws of the United States.
Intergraph Corporation
P.O. Box 240000
Huntsville, AL 35813
Terms of Use
Use of this software product is subject to the End User License Agreement ("EULA") delivered with this software product unless
the licensee has a valid signed license for this software product with Intergraph Corporation. If the licensee has a valid signed
license for this software product with Intergraph Corporation, the valid signed license shall take precedence and govern the use
of this software product. Subject to the terms contained within the applicable license agreement, Intergraph Corporation gives
licensee permission to print a reasonable number of copies of the documentation as defined in the applicable license agreement
and delivered with the software product for licensee's internal, non-commercial use. The documentation may not be printed for
resale or redistribution.
Warranties and Liabilities
All warranties given by Intergraph Corporation about equipment or software are set forth in the EULA provided with the software
or applicable license for the software product signed by Intergraph Corporation, and nothing stated in, or implied by, this
document or its contents shall be considered or deemed a modification or amendment of such warranties. Intergraph believes
the information in this publication is accurate as of its publication date.
The information and the software discussed in this document are subject to change without notice and are subject to applicable
technical product descriptions. Intergraph Corporation is not responsible for any error that may appear in this document.
The software discussed in this document is furnished under a license and may be used or copied only in accordance with the
terms of this license. No responsibility is assumed by Intergraph for the use or reliability of software on equipment that is not
supplied by Intergraph or its affiliated companies. THE USER OF THE SOFTWARE IS EXPECTED TO MAKE THE FINAL
EVALUATION AS TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN ENVIRONMENT.
Intergraph is not responsible for the accuracy of delivered data including, but not limited to, catalog, reference and symbol data.
Users should verify for themselves that the data is accurate and suitable for their project work.
Trademarks
Intergraph, the Intergraph logo, PDS, SmartPlant, SmartMarine, FrameWorks, I-Convert, I-Export, I-Sketch, IntelliShip, INtools,
ISOGEN, MARIAN, SmartSketch, SPOOLGEN, SupportManager, and SupportModeler are trademarks or registered trademarks
of Intergraph Corporation or its subsidiaries in the United States and other countries. Microsoft and Windows are registered
trademarks of Microsoft Corporation. MicroStation is a registered trademark of Bentley Systems, Inc. Other brands and product
names are trademarks of their respective owners.
Contents
Preface .......................................................................................................................................................... 5
SmartPlant Foundation Product Documentation .................................................................................... 5
Documentation Comments ..................................................................................................................... 6
Index ........................................................................................................................................................... 41
How to Configure the Line List Model - Provides information for system administrators on
how to configure the line list application in SmartPlant Foundation and describes the
underlying data model.
How to Configure Performance - Provides information for system administrators on how to
enhance the performance of SmartPlant Foundation.
How to Configure the Progress Model - Provides information for system administrators on
how to configure the progress model in SmartPlant Foundation and describes the underlying
data model.
How to Configure the Security Model - Provides information for system administrators on
how to configure the security model in SmartPlant Foundation and describes the underlying
data model.
How to Set Up and Configure SmartPlant Foundation - Provides information for system
administrators on how to set up and configure SmartPlant Foundation and describes the
underlying data model.
How to Configure the Workflow Model - Provides information for system administrators on
how to configure the workflow model in SmartPlant Foundation and describes the underlying
data model.
Documentation Comments
Send documentation comments or suggestions to PPMdoc@intergraph.com
(mailto:ppmdoc@intergraph.com?subject=documentation comments).
The information presented to the user is dynamically generated from the ComprisedOf
objects in each of the publish domains and this action is summarized by the following
diagram:
This dynamic generation presents the latest information to the user, with respect to the
different objects published, and is known as the last in wins presentation. This data is
presented after the query by name or ad hoc report. You cannot display these properties in
list views for regular queries.
You can navigate from the shared objects to the published objects to view them in detail.
You can review the inconsistencies of the published data, either from the shared object, or
from inconsistency reports.
For any further information on the delivery of CDW, please contact your Intergraph support
representative.
The structure of the CDW objects can be summarized by the following diagram:
Relationship navigation is now easier, either individually or by edges - for example it is now
from CDW object to CDW object, such as instrument to pipeline.
The CDW objects can be enhanced over and above the storage of published data. For
example purchasing, for construction status management information, could be added to the
CDW schema. This can be done by adding interfaces with properties or relationships.
ISPFTEFPublishedDocVersionPI
This is a new primary interface for the SPFTEFPublishedDocVersion ClassDef. The
ISPFTEFPublishedDocVersion is still realized and it retains the code implementation for the
publish and consolidate mechanism using shared objects. Override mechanisms have been
added in this code for project utilization.
ISPFCDWPublishedDocVersion
The new ISPFCDWPublishedDocVersion interface is optionally realized by the published
document version. It is instantiated when a published document is loaded and the system is
configured to use the CDW, as opposed to the shared object.
The following diagram shows the relationship to this interface:
The CDW schema is totally configurable but all the ClassDefs have to realize a minimum set of
interfaces. The diagram below shows the model for typical CDW ClassDefs in this example, the
consolidated SPFCDWInstrument.
ISPFCDWClassifiedItem
This interface is realized on classified items as well as the ISPFClassifiedItem interface, which it
implies. These should be optionally realized, as the typing properties are not always published
and the classification relationships cannot be determined. See the section Consolidation
Implementation and Customization (on page 21) for more details. Code is implemented on this
interface to control the creation of the SmartPlant Foundation primary classification relationship
and associated classification level relationships used for queries.
There are no properties exposed on this interface.
ISPFTEFPublishedObjectCollection
This interface is retained because it has the ComprisedOf relationship to relate the published
tool data to the consolidated objects.
This enables the CDW to use exactly the same navigation mechanism that is used by the
shared object to view publish data.
Source Domain
To specify the source domain on CDW relationships, a new interface is made called
ISPFCDWObjectDetail.
ISPFCDWObjectDetail
This is an optionally realized interface on the Rel ClassDef which is used to store the information
about the tool that publishes the data being consolidated.
In the out of the box model ISPFCDWObjectDetail is realized for relationships only but it is
easier to make it available for objects as it is on every relationship.
SPFAuthoringRelDelToCDWRelDef
This meta-schema RelDef is defined to map from an authoring RelDef to a CDW RelDef. These
are defined in the CDW schema files. If any such relationships exist to the published data, an
additional file is created and attached to the published document that contains the target
relationships to be created to the published data.
An example of where this new RelDef can be used is shown below.
Customization (on page 24) which describes the customization possibilities in more detail,
including suggestions on how to do precedence; for example PID data is to take precedence
over the PFD data for the instruments or for particular properties on the instrument.
Classification Handling
This describes the implementation for CDW classification relationships.
The type properties on the published item are used to determine what classification the object
should have. The system finds all the EnumListType and EnumListLevelType properties on the
CDW object and expands the SPFEnumEnumObjClass relationship.
If a classification is found as the result of the expansion a relationship is created between the
CDW object and the classification (SPFPrimaryClassification).
The logic is implemented on the ISPFClassifiedItem interface, so the CDW object needs to have
that interface as well as the ISPFCDWClassifiedItem interface.
Sometimes the type properties are set on the published data and sometimes they are not. This
means the ISPFClassifiedItem interface is not required because when the software can’t find a
classification, it will throw an exception.
However, a way to know when to add the ISPFClassifiedItem interface to code is needed. A
specific map function SPFClassificationFromTyping was written just to address this. Map
functions are pieces of process logic that can be run when the CDW object is created, if this
mapping exists then the object is related to the classification tree based on the Enum – Class
Tree mappings.
Map Functions
It is possible to create a map function and relate the map function to the property mapping
relationship. This enables code to be written for the map function using the Method override
technique described in the section on Mapping customization found in the CDW Customization
(on page 24).
This new RelDef allows map functions to be modelled against any PropertyDef to PropertyDef
and InterfaceDef to InterfaceDef mapping.
<Rel>
<IObject
UID="InstrumentType.InstrumentType.PropertyDefToPropertyDef.MF_SPFClass
ificationFromTyping"/>
<IRel UID1="InstrumentType.InstrumentType.PropertyDefToPropertyDef"
UID2="MF_SPFClassificationFromTyping" DefUID="MappingToSPFMapFunction"
OrderValue="0" IsRequired="False"/>
<ISchemaObj/>
</Rel>
CDW Customization
Consolidation Customization
The following MethodDefs have been defined against the new ISPFCDWPublishedDocVersion
interface:
PerformMappingAndTransformation.
ConsolidateChunkOfObjects – Takes a set of items from the input source and decides
how to process them, filling up the SPF transaction.
ConsolidateChunkOfRels – Acts the same as ConsolidateChunkOfObjects.
The Methods above, as well as those defined below, can be overridden once you have done the
sideways override of ISPFCDWPublishedDocVersion.(See the SmartPlant Foundation
Customization Guide for details on sideways override).
ConsolidateDataContainer – Takes the data file and runs through the consolidation
process.
ConsolidateInstructionContainer – Processes delete instructions.
To see each inividual method available, use the object browser to view them.
Delete Instructions
Three MethodDefs are implemented on ISPCDWObject to allow control of the behavior when a
delete occurs.
1. ProcessItemBeforeToolDelete – Sees how many ComprisedOf relationships exist and
then call:
a. OnProcessItemWithSingleComprisedOfRel - Checks to see if the CDW object last
updated date is more recent than the creation date of the ComprisedOf relationship. If
the last updated date is more recent, it indicates the CDW object has been updated and
will not delete the CDW object. If the object hasn’t been updated it looks to see if there
are any relationships to other objects that are not part of the mapping. If there are
relationships it will not be removed.
b. OnProcessItemWithMultipleComprisedOfRel – Terminates any current properties
that have a source domain equal to the domain of the tool data being removed. For each
of the properties being terminated it looks to see if it had a previous value with a
different source domain and re-instates it.
Precedence Customization
The out-of-the-box precedence process always updates the data on the CDW object as new
data is published. This process makes the published data represent the last in wins data. This
can be changed through customization.
On the ISPFCDWPublishedDocVersionDefault code class there is an override method called
OnSetProperty. This method is called each time we set a property on a new or existing CDW
object.
The inputs into this function are currently:
OnSetProperty(ByVal pobjTargetIDef As IInterface, ByVal
pstrPropertyDefUID As String, ByVal pobjValue As Object)
Access the properties collection from pobjTargetIDef then find the PropertyDefault object for the
property of interest and see the existing value and the source domain.
There are two properties, TargetDomain and SourceDomain which help with precedence.
Mapping Customization
The PerformMappingAndTransformation MethodDef on ISPFCDWPublishedDocVersion
controls mapping. You can perform a sideways override on the
ISPFCDWPublishedDocVersionDefault interface to be able to override the following Methods:
OnCreateInputAdapter – Allows you to write a new class and inherit from InputAdapter,
must implement ISPFInputAdapter.
OnCreateOutputAdapter – Allows you to write a new class and inherit from OutputAdapter,
must implement IOutputAdapter.
OnCreateMappingClass – Allows you to write a new class and inherit from
SPFMappingClass, must implement ISPFMappingClass.
OnCreateInterpreter – Allows you to write a new interpreter class and inherit from
Interpreter, must implement Interpreter class.
The Methods above allow any project to replace any of the above classes completely with their
own custom version of the class. This is only for mapping. The mapping output class does not
consider about SameAs. It simply maps the properties using the same UID’s. The consolidate
code performs the required logic for SameAs for example.
Input Adapter
To override the GetNextObject and GetObject methods as well as construct custom
AdapterObject (IAdapterObject), use the CreateAdapterObject method.
Output Adapter
Ten Methods can be overridden. Six are defined on the IOutputAdapter interface.
SPFMappingClass
The role of this class is to interrogate the database to provide mapping information by ClassDef
or RelDef. Several Methods can be overridden, allowing customization around what mapping is
returned. The IMapClass interface is used to send back instructions (property mapping) and
IDefInstructions (interface mapping).
Interpreter
The interpreter is a simple class that asks the input adapter for an object (IAdapterObject). If it is
an object, the interpreter calls the function OnExecuteObj which is an override function. If it finds
a relationship the interpreter calls OnExecuteRel.
OnExecuteObj
The process logic is:-
1. Ask mapping class for the mapping for this ClassDef.
2. If no mapping found then ignore this input item.
a. The current setup means it will always default to CDWObject.
3. Call bringcreate on the output adapter which creates a new object using the map to
ClassDef.
4. Set output object name and description from input source.
5. Process each of the SetInstructions (properties).
a. Ask input for source property value.
6. Tell output to write target property with value.
a. Process each of the ISetInstructions (interface).
b. If target interface realizes source interface then create it.
7. Call finish create on output class.
OnExecuteRel
The process logic is:-
1. Extract the relationship definition UID.
2. Ask mapping class for the mapping for this RelDefUID.
3. If no mapping found then ignore relationship.
4. Extract the UID,UID1 and UID2 from the input source.
5. Ask the output adapter to create a new relationship using the mapto RelDefUID, UID, UID1
and UID2 (BeginCreateRel).
6. Process each of the SetInstructions (properties).
a. Ask input for source property value.
b. Tell output to write target property with value.
7. Process each of the ISetInstructions (interface).
a. If target interface realizes source interface then create it.
8. Call finish CreateRel on output class.
Correlate by Name
In the out of the box implementation the SameAs relationships manage correlation between two
objects. For example objectA in the PID domain is the same as objectB in the IDX domain.
These special relationships are placed inside the published xml file and are generated when
manually correlating after retrieve. The Auto-Correlate workflow matches on name and creates
the SameAs relationships; however, this workflow is not certified on CDW.
For those projects that use non-Intergraph tools for authoring data or SmartPlant Foundation for
authoring, there is no mechanism to correlate. To plug this gap and to provide more flexibility
than just name correlation, we have written custom code to use the unique key definition to
define where two objects are the same. This custom code can be modified as required to fit the
needs of your business.
In the example below, we use a unique key definition on the CDW ClassDef to define how we
correlate.
<ClassDef>
<IObject UID="SPFCDWInstrument" Name="SPFCDWInstrument"
Description="Instrument (Planned Material)" />
<IClassDef />
<ISchemaObj DisplayName="Instrument (Planned Material)" />
<ISPFClassDefExt SPFIsConfigurationControlled="True"
SPFUniqueKeyDef="CDWInst,CurrentConfig,Name"/>
</ClassDef>
In the example above, we specify that the configuration and name are the uniqueness. You can
look at related information and include that in the key as well.
The Method to override is called OnCreateNewObjectAndMergeWithInputs. This method is on
the ISPFCDWPublishedDocVersionDefault interface.
The process logic is:
1. Look to see if the CDW ClassDef has a unique key.
2. Create a temporary object and set all the properties.
3. Call the GenerateKey function which returns a unique key.
4. Look in the database for another CDW object with the same unique key.
a. If one found then update it and return it.
b. Otherwise create a new CDW Object and return it.
5. The Comprisedof Rel will be created between the tool data and the object returned.
Me.CoreModule.QueryRequest.AddQueryInterface("ISPFTEFPublishedDocMaster
")
'
' As the Doc Master and the 2 tier document have the same
UID then it is better to find by UID
'
Dim lobjDocMasters As IObjectDictionary =
CoreModule.QueryRequest.RunByUID(pobjPublishedItem.UID)
If lobjDocMasters IsNot Nothing AndAlso
lobjDocMasters.Count > 0 Then
Return lobjDocMasters(0)
End If
'
' If a document master has not been found then the code
continues to create a regular CDW object for this published object.
'
End If
'
' Extract the config
'
Dim lstrConfig As String = ""
If pobjExistingCDWItem IsNot Nothing Then
lstrConfig = pobjExistingCDWItem.Config
End If
If String.IsNullOrEmpty(lstrConfig) Then lstrConfig =
CoreModule.Server.Context.CreateConfiguration.ToString
'
' Append an _S on the end so we can distinguish from Tool object
plus we are consistent with the original implementation. Use function so
we
' can change this in just one place should it be wrong.
'
Dim lstrNewUID As String = pstrCDWUID
'
' Make up your own correlate rules here....
'
Dim lobjClassDef As IClassDef =
CType(Me.CoreModule.ProcessCache.Item(pobjCDWObject.ClassDefinitionUID,
"SCHEMA").Interfaces("IClassDef"), IClassDef)
If String.IsNullOrEmpty(lobjClassDef.SPFUniqueKeyDef) =
False Then
'
' Create a temp object so we can call the generate key method
'
Dim lobjTempObj As IObject =
Utilities.GeneralUtilities.InstantiateObjectNoFootprint(Me.CoreModule,
lobjClassDef.UID, "", "", "")
lobjTempObj.Config = lstrConfig
'
' Need to call the base function that will set the
properties on the temp object from the tool representation
'
OnSetPropertiesFromSource(lobjTempObj, pobjCDWObject)
'
' Now call the GenerateKey
'
Dim lstrUniqueKey As String =
CType(lobjTempObj.Interfaces("IObject"),
IObjectDefault).GetClass.GenerateKey(lobjClassDef.SPFUniqueKeyDef)
'
' Now search the database looking for unique key
'
Dim lcolUniqueKeys As New Specialized.StringCollection
lcolUniqueKeys.Add(lstrUniqueKey)
'
' Look for objects with these unique keys
'
Dim lobjDataMgr As New
DataAccess.DataManager(Me.CoreModule)
Dim lcolExistingOBIDs As Generic.Dictionary(Of String,
ArrayList) =
lobjDataMgr.GetExistingOBIDsForDomainAndConfigAndUniquekey(lcolUniqueKe
ys, Me.TargetDomain.UID, lstrConfig)
'
' If there are existing obid's then use that object
'
If lcolExistingOBIDs.Count > 0 Then
Dim lobjCDWExistingItems As IObjectDictionary =
Me.CoreModule.QueryRequest.RunByOBIDCollection(lcolExistingOBIDs(lstrUn
iqueKey))
If lobjCDWExistingItems.Count > 0 Then
Dim lobjExistingCDWItem As IObject =
lobjCDWExistingItems(0)
'
' Perform the mapping
' Call function to update the CDW Object
'
Dim lobjUpdatedItem As IObject =
OnUpdateObjectAndMergeWithInputs(lobjExistingCDWItem, pobjCDWObject)
'
' Send back the first item
'
Return lobjExistingCDWItem
End If
End If
End If
'
' Call the mybase code
'
Return
MyBase.OnCreateNewObjectAndMergeWithInputs(pobjPublishedItem,
pobjExistingCDWItem, pobjCDWObject, pstrCDWUID)
End Function
<SPFDomainGroup>
<IObject UID="DG_CDW" Name="CDW"/>
<ISPFAdminItem/>
<ISPFDomainGroup SPFTablePrefix="CDW"/>
<ISPFSubscribableItem />
</SPFDomainGroup>
<Rel>
<IObject UID="CDW.CDW"/>
<IRel UID1="DG_CDW" UID2="CDW" DefUID="SPFDomainGroupDomain"/>
</Rel>
A CDW Domain group is created and the relationship points to this CDW domain group. The
new model update is:
<SPFDomainGroup>
<IObject UID="DG_CDW" Name="CDW"/>
<ISPFAdminItem/>
<ISPFDomainGroup SPFTablePrefix="CDW"/>
<ISPFSubscribableItem />
</SPFDomainGroup>
<Rel>
<IObject UID="CDW.CDW"/>
<IRel UID1="DG_CDW" UID2="CDW" DefUID="SPFDomainGroupDomain"/>
</Rel>
Good examples of the above are provided in the CDW Demonstration Model (on page 37).
SPFCDWFilter
SPFCDWFooting
SPFCDWGasket
SPFCDWHangerSupport
SPFCDWHVACPort
SPFCDWInstrument
SPFCDWInstrumentLoop
SPFCDWIOCard
SPFCDWLadder
SPFCDWLineListRecord
SPFCDWNozzle
SPFCDWPhaseChemicalComponent
SPFCDWPipe
SPFCDWPipeBoltSet
SPFCDWPipeClamp
SPFCDWPipeline
SPFCDWPipeRun
SPFCDWPipeSpool
SPFCDWPipingComponent
SPFCDWPipingPort
SPFCDWPipingSystemConnector
SPFCDWPipingSystemConnector_Process
SPFCDWPort
SPFCDWProcessCase
SPFCDWProcessDataCase
SPFCDWProcessPoint
SPFCDWProcessPort
SPFCDWProcessPort_Process
SPFCDWRackSlot
SPFCDWSignalChannel
SPFCDWSinglePhase
SPFCDWSlab
SPFCDWSteamTrap
SPFCDWStructuralPort
SPFCDWStructure
SPFCDWTerminalItem
SPFCDWTrunk
SPFCDWValveOperator
SPFCDWVent
SPFCDWWeld
SPFCDWWiringTray
The Mapping
The mapping is a simple 1:1 mapping between the SmartPlant Schema and the CDW
demonstration schema.
The demonstration schema also includes mapping for any interface that contains type properties
and a set of PID interfaces to use in the demonstrator.
IDifferentialProducer
IEnergyPort
IEquipment
IInstrument
IPipingComponent
IEquipmentComponent
IProcessPointCase
IPipeCrossSectionItem
IInlineComponent
IPipingSpecifiedItem
IFluidSystem
IPipingConnector
IPipingConnectorComposition
The following RelDefs are also mapped across the SmartPlant Schema and CDW
demonstration schema. The mapping involved creating new CDW interfaces and then mapping
and realizing those.
EquipmentComponentComposition
PipingPortComposition
PipingEnd1Conn
PipingEnd2Conn
PipingConnectors
PipingTapOrFitting
Quick Find menus are provided for all objects but the less common ones are available
under Find > Consolidated Data > Other as per the following example:
E
Exposing the CDW Data • 39
H
How to Configure the CDW • 33
M
Map Functions • 23
Mapping Authoring Relationships to the
CDW • 19
Migration from Shared Object to CDW • 12
P
Preface • 5
S
Summary of the Shared Object Technology
•7
T
The CDW Mapping Schema • 18
The CDW Object Schema • 14