Relationship Suppression Check (PLMRelationSuppressionCheck)

An opening ID is an entry point used to customize business logic. Relationship Suppression Check (PLMRelationSuppressionCheck) validates that the suppression of the attachment of a document from an object is valid with regards of some enterprise rules. When the check fails, a message can be provided to the end user, explaining the reason why. Two severity of message can be generated: When the check fails, a message can be provided to the end user, explaining the reason why.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is called when detaching a material from an object (its intent is wider because it concerns the suppression of relationship between two objects. But at the moment, it is limited to this particular scenario)

The table below provides you with information related to the definition of the Opening ID.

Opening ID: PLMRelationSuppressionCheck
Customization intent: Validation
Execution context:Client only

Input Objects

Input objects must be of the following types:

  • ThisObject
  • Parameters corresponds to the context object.
  • Validation

Context Object Parameters (in addition to standard message and Severity parameters for validation BL)

For Documents Attached to Objects

Parameter NamesTypesRead/WriteComments
TargetPLMDMTDocumentReadParameter in input that contains the target object of the relation to be suppressed, i.e. the document.
RelationTypeStringReadString parameter in input of the rule. In this case, its value is PLMDocConnection.
PolicyStringReadPolicy name.

Note: Attributes of both the input object and the target are available in the Business Logic and can be used to determine the check validity. The attribute that can prove useful is the current state.
For Documents Inserted into a Folder
Parameter NamesTypesRead/WriteComments
TargetPLMCoreReference

PLMCoreRepReference

ReadParameter in input that contains the target object of the relation to be suppressed, i.e. the object being inserted.
RelationTypeStringReadString parameter in input of the rule. In this case, its value is PLMFolderConnection.
PolicyStringReadPolicy name.
Note: This works both with folders and workspace vaults.

Sample

The following sample shows how to check some attributes values (e.g. V_description) of the product to which the document is detached.

If (ThisObject.V_description == "Test")
{
validation = TRUE
}
else
{
validation = FALSE
}
if (validation == FALSE)
{
Parameters.Message = "Cannot attach the document under the Product"
Parameters.Severity=2
}

For Documents Inserted into a Folder

The following BL sample shows how to check some attributes values (e.g. V_description) of the object attached under the folder.

Let FolderReference(PLMCoreReference)
Let ObjectReference(PLMEntity)
Let FolderReferenceDescription(String)
Let ObjectDescription(String)

set FolderReferenceDescription = ThisObject.V_description

if(true==Parameters->HasAttribute("Target"))

{
set ObjectReference = Parameters->GetAttributeObject("Target")
}
if(true==ObjectReference->HasAttribute("V_description"))
{
set ObjectDescription = ObjectReference->GetAttributeString("V_description")
}
if (ObjectDescription==FolderReferenceDescription)
{
Validation = true
}
else
{
Validation = false
}

if (Validation == false)
{
Parameters.Message = "Cannot insert the Object under the Folder"
Parameters.Severity=2 
}