The adapter supports the generation of tombstones for Pipelines. During the course of tombstone processing, when SmartPlant Foundation calls back to the adapter to inquire if an objects exists, the adapter will implement the following logic. This will result in tombstones being generated for pipelines that are eliminated from the design:
IEFAdapter.ObjectExistsInTool( sObjUID, sClassUID )
If sClassUID = "PIDPipeline" then
Parse the UID to get the SPID
Query the database for a Pipeline with this SPID
If Pipeline exists then
Query the database for Piperuns with matching attribute values
If one or more Piperuns are found then
ObjectExistsInTool = True
Else
Delete the pipeline from the P&ID database
ObjectExistsInTool = False
Endif
Else
ObjectExistsInTool = False
Endif
Exit Sub
Endif