Applies To | |
Product(s): | OpenPlant CONNECT PID Edition Update 9 |
Version(s): |
10.09.00.74
|
Environment: | Windows 10 (64-bit) |
Area: | Customization (Associated Item) |
Subarea: | PlantSight Synchronization issue |
Original Author: | Ashutosh Patil, Bentley Product advantage Group
|
Overview
From OpenPlant Update 9 release, new feature has been released for handling tags in PlantSight to be used with OpenPlant applications like OpenPlant Modeler and OpenPlant PID.
Background
Currently all data of OpenPlant PID is getting pushed to Plantsight i.e into its Data Manager. So as per project there is a need to add new Associated Item for Equipment, Pipeline, Valve etc and accordingly adding its new relationship for required component.
It has been observed that after adding Associated item and its new relationship wrt Equipment or Pipeline etc, If Drawing to Plantsight sync is done it works fine but when sync from PlantSight to Drawing they below error. Error:,”Synchronization Stopped because of Error:’CommitChangeSet has Fataly terminated before Committing all instance because of following exception: Was not able to create the relationship.The reason may be that it already exist’ ”

Also from drawing to Plantsight even if the synchronization is successful yet the new added components consisting of new associated item relationship reflected into repository dialog box i.e Drawing to Plantsight difference dialog again and again. Hence this wiki will help you to resolve this issue as well get an Idea of how to add Associated item through OPPA and its relationship verification in syncing from drawing to PlantSight and PlantSight to drawing there won’t be any issues..
A. Adding Train in Associated Item and creating Relationship through OPPA: Schema Editor
- Launch Openplant Project Administrator CE

- Select workset, Go to application OpenPlantPID then select on Settings tab then click on Schema editor.

- In schema editor go to Plant Breakdown Element, Right click on it and select Add derived class.

- After hitting on Add derived class option, A new dialog box with name Create a New Class would be popped up . Enter Train in name in caps and display label would be taken directly in small letter then click on OK

- After clicking on OK additional dialog box saying same Associated item need to be added to Openplant schema or not so click on yes and proceed.

- After adding Train as Associated item in Plant Breakdown Element click on properties tab select Name and hit on Mark Selected Property as Business key as shown below .
Save the changes made

- Now select Openplant schema, Go to Train in plant breakdown element and view that in properties for Name BusinessKey has not been assigned.
Kindly assign the same as per steps shown in last image.

- Switch to OpenPlant PID schema again, Select tab Relationships and click on + icon for creating or adding new relationship as shown below

- A dialog box with create a new relationship would be popped up, enter TRAIN_HAS_NAMED_ITEM in name and it would be taken directly in display label in small caps .
In source name select Train from Plant Breakdown Element through three dots i.e ellipses and in Target name select Named item class through ellipses and then click on OK as shown in image below.

In Advance would show you the cardinality need to be kept for both i.e Source , Target and mostly it is kept (0,1) &(0,N) respectively.Save the changes made.
Similarly add the same the relationship for OpenPlant PID schema as well with same above procedure shown.
- Switch back again to Openplant schema, In search type Device or go directly to Device class properties

- Add new property through + icon and name it as Train like shown in image below and then click on save

- Similarly go to Piping Network Segment an add new property as Train

- Do the same for Piping Network System .

Mark over here after adding Train property, Category is not getting defined automatically we have to do it manually in class editor .
Save the changes and close Schema editor .
B. Adding Train in Associated List of Classes through OPPA: Associations tab
- Go back to workset, Select application Openplant PID and then click on Associations in Settings tab

- In Associations window through + icon proceed to Add New Class to Hierarchy that is add Train which is a new added Associated item in plant breakdown element

- Clicking on “+ “ icon dialog box would pop up in that Select class, Select Train from plant breakdown element then click on select class .

- Train would be enlisted below already added default Associated Items. Now add equipment, piperun, pipeline & fluid regulator through “+” icon . After all classes are added it get enlisted below Train associated item .

- Select Equipment drag it on to Train, During dragging it will ask for select relationship select Train has named item relationship and click on select relationship and proceed .

- After selecting relationship Equipment class would be displayed under Train associated item such that equipment would have relationship with Train associated item .

- Similarly drag all pipeline, fluid regulator piperun etc as well on to Train and it would be enlisted under it as shown below

- As soon as we click on save work breakdown structure items will rearrange and Train would be below service like shown in image below.
Save and Close association window.

C. Adding Train and its relationship into Expression through OPPA: Expression Editor tab
- Go to workset , Select Openplan PID application click on Settings →Expression Editor

. - In Expression Editor window go to Equipment and select Name property . As soon as Name is selected expression would be displayed on right hand sight pane small window which is added in default for equipment tagging.

- Now modify the relationship by adding Train has Named item into it, Copy below expression and paste on top of already existing one.
this.GetRelatedInstance("PLANT_AREA_HAS_NAMED_ITEM:1:PLANT_AREA").NAME & "-" & this.GetRelatedInstance("TRAIN_HAS_NAMED_ITEM:1:TRAIN").NAME & "-" & this.DEVICE_TYPE_CODE & "-" & this.NUMBER

- Similarly go to Pipeline -Name property you will find already added expression consisting of Plant_Area Service and Number .

- In Piping Network System that is pipeline we will replace Service relationship with Train Has Named item relationship as shown below .
this.GetRelatedInstance("PLANT_AREA_HAS_NAMED_ITEM:1:PLANT_AREA, NAME:?").NAME & "-" & this.GetRelatedInstance("TRAIN_HAS_NAMED_ITEM:1:TRAIN, NAME:?").NAME & "-" & this.NUMBER
copy above expression and replace on current expression in name of pipeline .

After doing all the changes click on Save.and close Expression Editor.
D. Adding Smaller customization for added Train in WBS and into its relationship through OPPA: Class Editor tab
- After doing this all such customization move to Class Editor for remaining small changes.

Direct Desktop icon of Class Editor

- Considering Imperial Workset :
Load OpenPlant.01.08.ecshema.xml schema along with OpenPlant_Supplemental_Tagging.01.08.ecschema.xml and OpenPlant_Supplemental_View.01.08.ecschema.xml schema.
Path (OpenPlant_01.08.ecshema: Std Path(C:\ProgramData\Bentley\OpenPlant CONNECT Edition\Configuration\WorkSpaces\OpenPlantExample\WorkSets\Imperial\Standards\OpenPlant\Schemas)
Load OpenPlant PID.01.08.eschema.xml& supplement it with OpenPlant_PID_Supplemental_Design.01.08.ecshema.xml through below default
Std path.:(OpenPlant PID.01.08.eschema.xml : C:\ProgramData\Bentley\OpenPlant CONNECT Edition\Configuration\WorkSpaces\OpenPlantExample\WorkSets\Metric\Standards\OpenPlant\Schemas)
- First load OpenPlant.01.08.eschema.xml and fo To PlantBreakDown Element, right click on System copy custom attribute Business key specification & Require Unique Businesskey then click on copy

- Go to Train right click on it and paste the custom attribute copied from System change the class scope from system to Train as shown in image below

- Proceed to Equipment since we are in Openplant schema and add category custom attribute and change its location to supplemental view schema as shown below .
Category can be added by clicking on override and then adding new custom attribute as Category. And fill the details as shown below.
Copy this category and paste on to Train property in Piping network system and Piping network segment .
- In Openplant schema go to Relationship classes, Select Plant Area has Named item right click on it select custom attribute then hit on copy .

- Copy Custom Attributes dialog would be launched in that in Display label section select Reference Type Relationship custom attribute & click on down arrow as shown in image below .

- Reference Type Relationship custom attribute is displayed in in copied custom attribute section then hit on copy icon .

- Now go to Train has Named Item relationship, Right click on it select custom attribute and paste Reference Type Relationship onto it .

- After doing paste right click on Train has Named Item relationship, Select add or remove custom attribute and check if the same Reference Type Relationship ca has been added or not.
This custom attribute Reference Type Relationship is hidden custom attribute and does not get added when we create relationship through OPPA
Also location of this schema is only for Openplant and Openplant 3D only not OpenPlant PID.

Note : If this custom attribute is not added then you will face an error which is shown at the top of this wiki article in background section related to synchronization stopped when user is syncing from Plantsight to drawing .
Adding this custom attribute in relationship resolves the error.
- Similarly copy this same custom attribute Reference Type Relation on Train has Piping Component relationship as well . After doing this changes click on save.

- Save the schemas and load Openplant PID schema and supplement with Supplemental design schema.

- In Openplant pid schema go to Train in Plant Breakdown Element and check property custom attribute . Change the default value to Train has Named item relationship as shown in image below

- After doing all these changes save the schemas.
E. Pushing Schema Customization to PlantSight through Connect Services of OPPA: Upgrade tab
- Go back to workset in OPPA, Select it go to Connect Service tab and then hit on Upgrade.

- Workset was already set up (provisioned ) to Plantsight hence after schema changes upgrade option was used such that new changes in schemas is pushed to plantsight. After upgrading's schema successfully, Click on finish

F. Launching OpenPlant PID through Workset in OPPA: OpenPlant PID
- Launch OpenPlant pid now from same work set in which changes are done and upgraded to PlantSight.

- Create a new dgn make sure sync option is enabled . Go to Standard Preferences and insert new values in all Associated Items mainly Plant_Area and Train section like shown in image below

- Now place a pump such that in Name section Train value is picked up automatically Tagging part as we enter values in tag information.

- Similarly place a pipeline as well and click on sync option such that dialog box Drawing to PlantSight differences is launched .
Select pump and check properties into which Train has Named item is also getting used like highlighted in below image then click on update

- After clicking on update, Drawing to PlantSight synchronization has completed successfully dialog box is launched

- Now click on sync option and select PlantSight to Drawing then click on OK. With this procedure we can confirm the error shown in background section at top of this wiki, syncing from PlantSight to drawing is resolved or not .

After clicking on PlantSight to Drawing if No difference found dialog box is launched then PlantSight to drawing synchronization is successful and thus we have resolved the below error popped up during reverse syncing.

Error: Synchronization Stopped because of Error:’CommitChangeSet has Fataly terminated before Committing all instance because of following exception: Was not able to create the relationship.The reason may be that it already exist’ ”.
- Keep this OpenPlant PID open and go to related PlantSight Project in which data has been pushed:
F. Launching PlantSight Portal To Add Tag consisting of Train associated Item: PlantSight Portal
- Click on Workset and then got Connect Service tab and hit on Plantsight tab to launch Plantsight portal where user can view Pushed data from dgn.
Plantsight portal can also be launched from dgn itself by option just beside sync.

- Further go to PlantSight portal→Data Manager→Tag Browser →Train and add a new Train value, Alread syned would be displayed as well on top.
As per Step F-2,Train value YYY added in dgn can be seen in data manager below just newly added one.

- Go to Equipment class in Plantsight portal of Tag Browser and add a new tag like shown in image below.
As per Step F-3 the equipment tag is seen at 3rd number in equipment list.

- Now go to dgn again second place a pump and from browser option select tag added in PlantSight for equipment pump and then click on OK.

- After hitting on OK this same tag is taken by pump, So it can be confirmed that customization done is working fine for new added associated item and its new relationship is also working fine when trying to sync from Plantsight to Drawing and PlantSight to drawing as well. -Note new added Train value is not picked up by component then select newly added one into Std Preferences and then it will select the tag with new train value for a component.

Thus we can resolve the error and can add associated item and its new relationship through OPPA too.
See Als
communities.bentley.com/.../how-to-create-new-associated-property-using-class-editor-in-openplant-connect-edition
Still a Problem?
If the above problem persists, then please create a Service Request and contact the Bentley Product Advantage group. Please include a list of all relevant details to get in depth analysis for a solution or workaround.