Howto Configurethe CDW
Howto Configurethe CDW
Documentation
Documentation shall mean, whether in electronic or printed form, User's Guides, Installation Guides, Reference Guides,
Administrator's Guides, Customization Guides, Programmer's Guides, Configuration Guides and Help Guides delivered with a
particular software product.
Other Documentation
Other Documentation shall mean, whether in electronic or printed form and delivered with software or on Intergraph Smart Support,
SharePoint, or box.net, any documentation related to work processes, workflows, and best practices that is provided by Intergraph
as guidance for using a software product.
Terms of Use
a. Use of a software product and Documentation is subject to the Software License Agreement ("SLA") delivered with the 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 and Documentation. 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.
b. For use of Documentation or Other Documentation where end user does not receive a SLA or does not have a valid license
agreement with Intergraph, Intergraph grants the Licensee a non-exclusive license to use the Documentation or Other
Documentation for Licensee’s internal non-commercial use. Intergraph Corporation gives Licensee permission to print a
reasonable number of copies of Other Documentation for Licensee’s internal, non-commercial use. The Other Documentation
may not be printed for resale or redistribution. This license contained in this subsection b) may be terminated at any time and
for any reason by Intergraph Corporation by giving written notice to Licensee.
Disclaimer of Warranties
Except for any express warranties as may be stated in the SLA or separate license or separate terms and conditions, Intergraph
Corporation disclaims any and all express or implied warranties including, but not limited to the implied warranties of merchantability
and fitness for a particular purpose and nothing stated in, or implied by, this document or its contents shall be considered or deemed
a modification or amendment of such disclaimer. 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, Documentation and Other Documentation discussed in this document are furnished under a license and may be used
or copied only in accordance with the terms of this license. THE USER OF THE SOFTWARE IS EXPECTED TO MAKE THE FINAL
EVALUATION AS TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN ENVIRONMENT.
Limitation of Damages
IN NO EVENT WILL INTERGRAPH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL INCIDENTAL,
SPECIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO, LOSS OF USE OR PRODUCTION, LOSS OF
REVENUE OR PROFIT, LOSS OF DATA, OR CLAIMS OF THIRD PARTIES, EVEN IF INTERGRAPH CORPORATION HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
UNDER NO CIRCUMSTANCES SHALL INTERGRAPH CORPORATION’S LIABILITY EXCEED THE AMOUNT THAT
INTERGRAPH CORPORATION HAS BEEN PAID BY LICENSEE UNDER THIS AGREEMENT AT THE TIME THE CLAIM IS
MADE. EXCEPT WHERE PROHIBITED BY APPLICABLE LAW, NO CLAIM, REGARDLESS OF FORM, ARISING OUT OF OR IN
CONNECTION WITH THE SUBJECT MATTER OF THIS DOCUMENT MAY BE BROUGHT BY LICENSEE MORE THAN TWO (2)
YEARS AFTER THE EVENT GIVING RISE TO THE CAUSE OF ACTION HAS OCCURRED.
IF UNDER THE LAW RULED APPLICABLE ANY PART OF THIS SECTION IS INVALID, THEN INTERGRAPH LIMITS ITS
LIABILITY TO THE MAXIMUM EXTENT ALLOWED BY SAID LAW.
Export Controls
Intergraph Corporation’s commercial-off-the-shelf software products, customized software and/or third-party software, including any
technical data related thereto (“Technical Data”), obtained from Intergraph Corporation, its subsidiaries or distributors, is subject to
the export control laws and regulations of the United States of America. Diversion contrary to U.S. law is prohibited. To the extent
prohibited by United States or other applicable laws, Intergraph Corporation software products, customized software, Technical Data,
and/or third-party software, or any derivatives thereof, obtained from Intergraph Corporation, its subsidiaries or distributors must not
be exported or re-exported, directly or indirectly (including via remote access) under the following circumstances:
a. To Cuba, Iran, North Korea, the Crimean region of Ukraine, or Syria, or any national of these countries or territories.
b. To any person or entity listed on any United States government denial list, including, but not limited to, the United States
Department of Commerce Denied Persons, Entities, and Unverified Lists, the United States Department of Treasury Specially
Designated Nationals List, and the United States Department of State Debarred List
(https://build.export.gov/main/ecr/eg_main_023148).
c. To any entity when Customer knows, or has reason to know, the end use of the software product, customized software,
Technical Data and/or third-party software obtained from Intergraph Corporation, its subsidiaries or distributors is related to the
design, development, production, or use of missiles, chemical, biological, or nuclear weapons, or other un-safeguarded or
sensitive nuclear uses.
d. To any entity when Customer knows, or has reason to know, that an illegal reshipment will take place.
e. Any questions regarding export/re-export of relevant Intergraph Corporation software product, customized software, Technical
Data and/or third-party software obtained from Intergraph Corporation, its subsidiaries or distributors, should be addressed to
PPM’s Export Compliance Department, 305 Intergraph Way, Madison, Alabama 35758 USA or at
[email protected]. Customer shall hold harmless and indemnify PPM and Hexagon Group Company for any
causes of action, claims, costs, expenses and/or damages resulting to PPM or Hexagon Group Company from a breach by
Customer.
Trademarks
Intergraph®, the Intergraph logo, Intergraph Smart®, SmartPlant®, SmartMarine, SmartSketch®, SmartPlant Cloud®, PDS®,
FrameWorks®, I-Route, I-Export, ISOGEN®, SPOOLGEN, SupportManager®, SupportModeler®, SAPPHIRE®, TANK, PV Elite®,
CADWorx®, CADWorx DraftPro®, GTSTRUDL®, and CAESAR II® are trademarks or registered trademarks of Intergraph Corporation
or its affiliates, parents, subsidiaries. Hexagon and the Hexagon logo are registered trademarks of Hexagon AB or its subsidiaries.
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.
Index ........................................................................................................................................................... 46
Customer Support
For the latest support information for this product, use a web browser to connect to
http://hexagonppm.com/ppm-support (http://hexagonppm.com/ppm-support). Also, you can
submit any documentation comments or suggestions you might have on our support site.
For properties shared across multiple tools, 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.
Queries are fully supported and can be used to find the CDW object in the database
because the CDW object has direct access to the published data, unlike the shared object.
Custom list view column sets for viewing CDW object data are fully supported.
The CDW objects can be enhanced over and above the storage of published data. For
example, the CDW schema can be extended to store data for purchasing or for construction
status management information. This can be done by adding interfaces with properties or
relationships.
After this equipment is published to the data warehouse, it might be useful to have the published
data related to the same folders and suppliers. It is possible to configure mapping within the
CDW to publish these relationships, without having to actually retrieve and publish the folders
and suppliers themselves. This is possible because the folders and suppliers are created in
what is referred to as a Common domain as shown in the diagram below.
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 class
definition must realize 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 cannot find
a classification, it will throw an exception.
Therefore, a way to know when to add the ISPFClassifiedItem interface to the code is needed. A
specific map function, SPFClassificationFromTyping, was written just to address this issue. Map
functions are pieces of process logic that can be run when the CDW object is created. If this
mapping exists, 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 allows you to write code for the map function using the Method override
technique, as described in the section on Mapping customization found in CDW customization
(on page 17).
CDW customization
Consolidation customization
The following method definitions 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 the SmartPlant Foundation transaction. This method is now
obsolete and is no longer called during consolidation.
ConsolidateChunkOfRels – Acts the same as the ConsolidateChunkOfObjects method.
This method is now obsolete and is no longer called during consolidation.
The methods defined below can be overridden once you have done the sideways override of
ISPFCDWPublishedDocVersion. See the Sideways override topic in the Interface Overrides
section of the SmartPlant Foundation Server Customization Guide for details.
ConsolidateChunkOfTaggedItems – Takes a group of tagged items from the transformed
file and decides how to process them, adding the changes to the transaction object for
commit to the database.
ConsolidateRels - Consolidates relationships in a tagged item group.
ProcessConsolidatedDeleteInstructions - Processes delete instructions.
TerminateCDWRelsForTerminateRels - Processes delete instructions for relationships.
ProcessSameAsDeleteInstructions - Processes delete instructions for SameAs
relationships.
ProcessConsolidatedUpdateInstructions - Processes update and update class
instructions.
ProcessConsolidatedUnClaimedInstructions - Processes unclaim instructions.
ProcessConsolidatedClaimInstructions - Processes claim instructions.
ConsolidateDataObjects - Processes the tool data objects to determine the UIDs of the
CDW objects.
ConsolidateCDWObjectsPropertiesAndRels - Updates the SPFTEFComprisedOf
relationships, properties, and other relationships of the CDW objects.
ConsolidateCDWPropertiesAndRels - Updates the SPFTEFComprisedOf relationships,
properties, and any other relationships of the individual CDW objects.
OnCreateComprisedOfRel - Creates a SPFTEFComprisedOf relationship between the
CDW object and the published object.
OnDetermineTargetCDWUIDForLocalUID - Determines the CDW object UID for the
current published object being processed and updates it in the ComprisedOfUIDs collections
provided in the input parameters.
Consolidation process
This is pseudo code to describe the current process for CDW consolidation. The following steps
describe the consolidation process:
1. ConsolidateObjects calls PersistFileWithTaggedItemsInContainers to rearrange the tool
data and tombstone files into one combined file in tagged items.
2. ConsolidateObjects calls the method definition PerformMappingAndTransformation.
3. Using the output stream from the mapping function, process the file.
Extract the component schema and SameAs mappings.
4. Read the file in chunks of tagged items, where the size of the chunks is configurable using
the PublishDataProcessingChunkSize setting in Server Manager.
a. For each chunk, call ConsolidateChunkOfTaggedItems.
b. Inside this function, try to lock the CDW objects and the published objects that they are
comprised of that would be affected. If the objects are locked successfully, process the
instructions and objects. If the objects are not successfully locked, then store the chunk
for processing at the end, once the entire file is completed.
c. If all tagged items have been successfully processed, commit the chunk to the
database.
5. Try again to consolidate chunks that could not be locked during the first attempt.
6. If objects still fail to lock successfully, then fail consolidation.
7. In the case of failed consolidation, set the number of committed chunks on the
SPFTEFTagItmGrpConsCnt property on the ISPFTEFPublishedDocVersion interface on
the document.
If you submit a consolidate task that attempts to lock objects currently locked by
another consolidate task, you receive the following message, "Consolidation was unable to lock
required objects. Please retry" Retry the failed consolidation task when the first completes and
the objects are unlocked.
Delete instructions
Three method definitions are implemented on ISPCDWObject to allow control of the behavior
when a delete occurs.
1. ProcessItemBeforeToolDelete – Checks to see how many ComprisedOf relationships
exist.
2. 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 so it will
not delete the CDW object. If the object has not been updated since the creation of the
ComprisedOf relationship, it looks to see if there are relationships to any other objects that
are not part of the mapping. If the object has no other relationships to anything else in
SmartPlant Foundation, it will be deleted.
3. 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 this looks to see if it had a previous value with a different source
domain and if so, re-instates it.
Precedence customization
The default 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 you 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, 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, that help with precedence.
Mapping customization
The PerformMappingAndTransformation method definition 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 previous methods allow any project to replace any of the classes with their own custom
version of the class; this replacement is for mapping only. The mapping output class does not
consider the SameAs relationship; it maps the properties using the same UID’s. The consolidate
code performs the required logic for the SameAs relationship.
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 class
definition or relationship definition. Several methods can be overridden, allowing customization
of 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. If it finds an instruction, the interpreter
calls OnExecuteInstruction.
OnExecuteObj
The process logic is described below:
1. Ask mapping class for the mapping for this class definition.
2. If no mapping is found, ignore this input item.
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 class
definition.
4. Set the output object name and description from the input source.
5. Process each of the SetInstructions (properties).
a. Ask the input adapter for the source property value.
b. Tell the output adapter to write the target property with the source property value.
6. Process each of the ISetInstructions (interface).
If the input source has the interface, then create the mapped interface onto the output
source.
This is a mapping exercise that adds an interface onto the output source if it
exists on the input source.
OnExecuteRel
The process logic is described as below:
1. Extract the relationship definition UID.
2. Ask mapping class for the mapping for this RelDefUID.
3. If no mapping is found, ignore the 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 the input adapter for the source property value.
b. Tell the output adapter to write the target property with the source property value.
7. Process each of the ISetInstructions (interface).
If the input source has the interface, then create the mapped interface onto the output
source.
This is a mapping exercise that adds an interface onto the output source if it
exists on the input source.
8. Call FinishCreateRel on output class.
OnExecuteInstruction
The process logic is described below:
1. Call BringCreate on the output adapter to create a new instruction object using the class
definition of the instruction.
2. Process each of the interfaces and properties.
a. Ask the adapter for the source property value.
b. If the property is PropValues, AddedInterfaces, RemovedInterfaces,
RemovedProperties, or RelDefUID, then determine the mapped property values.
c. Tell the output adapter to write the property with the determined property value.
3. Call FinishCreate on output class.
Correlate by name
In the default 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. There is an Auto-Correlate workflow that matches objects by
name and creates the SameAs relationships; this workflow is certified for use on CDW.
Auto-Correlate will not generate a SameAs relationship if doing so would result in a conflict
(that is, generating the SameAs relationship would result in the CDW object being related to
more than one object of the same Class definition).
If processing a SameAs relationship generated by Auto-Correlate would result in a conflict,
then the SameAs will be ignored.
If two different objects have the same class and the same name, they cannot be
consolidated by Auto-Correlate.
SameAs relationships that are published by the tool (identified as a SameAs relationship
without an OBID) are saved in the database. Existing SPFTEFComprisedOf relationships in
customer data are processed in the same manner as a SameAs relationship generated by
Auto-Correlate. If needed, the data may be corrected by publishing the SameAs
relationships or by reconsolidating.
A SameAs can result in two objects being related to the same CDW object. If a new object
with the same class and same name is published without a SameAs, it will not be related to
the existing CDW object, but instead will be related to a new CDW object.
If an object is renamed, any objects related to the renamed object because of a
tool-published SameAs will remain related. However, auto-correlated objects will be related
to a new CDW object.
Auto-correlation customization
You can perform a sideways override of ISPFTEFToolDataFileDefault and override the
following methods:
PostProcessAutoCorrelatedStructure – This method allows customization of the
auto-correlated, structured object collection determined by out-of-the box code. The method
is called once for every shared object definition for each unique class definition in the tool
data file. It is called after the default logic is executed for that shared object definition and an
updated, auto-correlated structure is available.
RetrieveObjectsWithClassDefUID – This method is used to retrieve all published objects
from the database with names that match the input criteria.
For those projects that use non-Hexagon PPM tools for authoring data or SmartPlant
Foundation for authoring, there is no mechanism to correlate. To address this gap and to
provide more flexibility than just name correlation, written custom code has been written 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 following example, we use a unique key definition on the CDW class definition to define
how we correlate. We also specify that the configuration and name define uniqueness. You can
look at other related information and include that in the unique key as well.
<ClassDef>
<IObject UID="SPFCDWInstrument" Name="SPFCDWInstrument"
Description="Instrument (Planned Material)" />
<IClassDef />
<ISchemaObj DisplayName="Instrument (Planned Material)" />
<ISPFClassDefExt SPFIsConfigurationControlled="True"
SPFUniqueKeyDef="CDWInst,CurrentConfig,Name"/>
</ClassDef>
The Method to override is called OnCreateNewObjectAndMergeWithInputs. This method is on
the ISPFCDWPublishedDocVersionDefault interface.
The process logic is described below:
1. Look to see if the CDW class definition 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 is found, update and return it.
b. Otherwise, create a new CDW Object, and return it.
5. The ComprisedOf relationship 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
Auto-correlation rules
Using auto-correlation rules, you can configure the auto-correlate workflow to correlate objects
that do not have a name. For example, most piping ports will not have a name, but should be
correlated. You can create this correlation manually, or you can use auto-correlation rules to
consider properties other than the name of the object.
An auto-correlation rule is specific to a CDW class definition. The rule uses either the
relationship to the parent of the object or the specific property values to find the correct object to
correlate with.
Auto-correlation rules will correlate an object with another based on the relationship to the
parent and the following conditions:
Matching name, if the name is set
If only one object is found using the relationship to the parent, then the object is matched
directly
If the name is not set and a match cannot be determined just on the relationship to the
parent, then the match can be created based on specified property values
Auto-correlation rules are applied while correlating objects related to documents published
using the Correlate workflow. All published objects with possible correlations are displayed
in the To Do List with the Correlate task. From that task, you can manually choose the
correlations to create, and those objects will be correlated during consolidation.
Auto-correlation rules are created for CDW classes. However, if you are using the shared
object model and want to use auto-correlation rules, you must first install the CDW schema
and create the rules. Then you can use those rules in your shared object model
environment.
Auto-correlation rules are not required to automatically correlate items during publish. If no
rule has been configured for a specific class, the system will use the standard auto-correlate
functionality to correlate the items, based on matching name and shared object class.
If you are manually correlating items that belong to a shared object class for which an
auto-correlation rule exists, the software applies the rules internally and presents a warning
message if the manual correlation does not match the rule. You can dismiss the warning and
continue.
For more information about creating auto-correlation rules, see Managing auto-correlation rules
(on page 27).
Delivered rules
Two auto-correlation rules are delivered with CDW schema. They are inactive by default. To
activate the rules, view them in the List Edit control and check the Is Active option.
A Resolve-Conflicts task is added to your To Do List after the document is loaded and
consolidated. Once you click the Correlate command from this task, a dialog box
displays all the objects that were found to have conflicts during correlation, along with all
the potential matching shared objects. Choose the appropriate shared object for each of
the objects. Once you approve the task, these correlations are updated in the database.
The criteria used when correlating objects are honored in the following priority:
1. SameAs relationship published by a tool
2. Custom SameAs relationship (provided by a user during auto-correlate step)
3. Applied auto-correlate rule
CDW mapping
Any properties or relationships that will be consolidated from published objects to the CDW
objects require mapping, as does the CDW model. The following components of the model
require mapping:
ClassDefToClassDef
InterfaceDefToInterfaceDef
RelDefToRelDef
PropertyDefToPropertyDef
This mapping must be created in xml load files. It is relatively straight forward, especially if it is
1:1 mapping to the SmartPlant Schema interfaces.
<SPFDomainGroup>
<IObject UID="DG_CDW" Name="CDW"/>
<ISPFAdminItem/>
<ISPFDomainGroup SPFTablePrefix="CDW"/>
<ISPFSubscribableItem />
</SPFDomainGroup>
A new relationship associating the CDW domain to the new CDW domain group is delivered
with the CDW sample database, part of the CDW consolidated load file, but a sample of the
XML used to create it is provided below:
<Rel>
<IObject UID="CDW.CDW"/>
<IRel UID1="DG_CDW" UID2="CDW" DefUID="SPFDomainGroupDomain"/>
</Rel>
For more information on the CDW consolidated load file, see CDW Demonstration Model (on
page 42).
Create edge definitions to navigate across intermediate objects, such as process points. For
example, create edges to navigate from equipment to pipelines to instruments.
Examples of all the above are provided in the CDW Demonstration Model (on page 42).
ELE 100
PID 90
SP3D 90
LLA 80
In this example:
Data the LLA domain is prioritized over data from domains not listed.
Data from the SP3D or SPPID domain is prioritized over data from LLA.
Data from ELE domain is given the top priority and will not be replaced in the CDW domain
with data from any other domain.
Since the PID and SP3D domains have the same Order Value, they are both considered a
higher priority than the LLA domain and a lower priority than the ELE domain, but neither is
a higher priority than the other. If data from either of these domains is stored in the CDW
domain when the different data is published into the other domain, the CDW domain value
will be replaced with the new value.
4. Using the Publish Domains list, create a list of the domains from which the data should
take priority. Click to add the domain to the table on the left side.
5. For each domain listed on the left side, provide an Order Value to set the priority.
The data from each domain will be replaced in the CDW domain only with data
from a domain with a higher value.
4. Select the rule and click to associate the rule with the schema object.
ISPFTEFPublishedDocVersionPI
This is a new primary interface for the SPFTEFPublishedDocVersion class definition. 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 CDW schema is fully configurable, but all the class definitions must realize a minimum set
of interfaces. The diagram below shows the model for typical CDW class definitions, 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 14) 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.
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 published 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 class definition and is used to store the
information about the tool that publishes the data being consolidated.
In the default model, ISPFCDWObjectDetail is realized for relationships only, but can easily be
made available for objects, as it is on every relationship.
This new relationship definition allows map functions to be modeled against any
PropertyDef-to-PropertyDef and InterfaceDef-to-InterfaceDef mapping.
SPFAuthoringRelDefToCDWRelDef
This meta-schema relationship definition is defined to map from an authoring relationship
definition to a CDW relationship definition. These are defined in the CDW schema files. If any of
these mapping relationships are present, then the publish process generates an additional file
associated with the published document that contains the mapped relationships, and this is
created between the published and common data.
An example of where this new relationship definition can be used is shown below.
The model
The demonstration model uses one CDW class definition for each SmartPlant Schema
SharedObjectDef. It also uses its own interfaces, properties, and relationships, though it could
just as easily reuse the SmartPlant Schema.
The following class definitions are delivered in the CDWDEV_Consolidated.xml load file:
SPFCDWBranchPoint
SPFCDWBulkPhase
SPFCDWCable
SPFCDWCableRun
SPFCDWCableSchedule
SPFCDWCableTrayPort
SPFCDWCableway
SPFCDWCablewayPort
SPFCDWCircuit
SPFCDWConduit
SPFCDWConduitPort
SPFCDWConduitRun
SPFCDWControlSysIO
SPFCDWDuct
SPFCDWDuctRun
SPFCDWElectricalConnector
SPFCDWElectricalPanel
SPFCDWEquipment
SPFCDWEquipmentComp
SPFCDWEquipmentFoundation
SPFCDWEquipmentFoundationPort
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
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 demonstration environment.
IDifferentialProducer
IEnergyPort
IEquipment
IInstrument
IPipingComponent
IEquipmentComponent
IProcessPointCase
IPipeCrossSectionItem
IInlineComponent
IPipingSpecifiedItem
IFluidSystem
IPipingConnector
IPipingConnectorComposition
The following relationship definitions are also mapped across the SmartPlant schema and CDW
demonstration schema. The mapping process involved creating new CDW interfaces and then
mapping and realizing those.
EquipmentComponentComposition
PipingPortComposition
PipingEnd1Conn
PipingEnd2Conn
PipingConnectors
PipingTapOrFitting
E
Enabling CDW consolidation • 45
Exposing the CDW data • 45
Extending the CDW model and mapping •
28
H
How to Configure the CDW • 28
M
Managing and using CDW precedence
rules • 31
Managing auto-correlation rules • 27