Context Object Parameters
Table 1. Business Object Standard Parameters
| Parameter Name |
Type |
Read or Write |
Comments |
EVENT |
String |
Read |
Any of the supported events. |
NAME |
String |
Read |
Business object name |
ORGANIZATION |
String |
Read |
The organization that owns the business object
|
OWNER |
String |
Read |
The owner of the business object |
PHYSICALID |
String |
Read |
The physical ID for the business object |
POLICY |
String |
Read |
The business object policy |
PROJECT |
String |
Read |
The project (collaborative space) that owns the
business object |
REVISION |
String |
Read |
Business object revision |
TYPE |
String |
Read |
Business object type |
Table 2. Additional Parameters for disconnect
| Parameter Name |
Type |
Read or Write |
Comments |
CONNECTION |
String |
Read |
End of relationship (From or
To) |
OLDREL |
Object |
Read |
The relationship that has been removed
|
AuditTags |
List |
Read |
Logging event of the transaction. |
Samples
Let rel (PLMCoreInstance)
Trace(1, "Execution disconnect_script on ", ThisObject.PLM_ExternalID )
Trace(1, "Test macro CONNECTION = ", Parameters.Macros.GetString("CONNECTION") )if(ThisObject.current == "RELEASED")
{
ReportUXMessage("Cannot modify a RELEASED object")
Validation = false
}
else
{
Set rel = Parameters.Macros.GetObject("OLDREL")
if (rel <> NULL)
{
Trace(1, "OLDREL should have been deleted. Something weird happen with ", rel.GetAttributeString("PLMInstance.V_Name"))
Validation = false
}
else
{
Trace(1, "OLDREL is NULL has expected")
Validation = true
}
}
The following sample contains a script that issues a message with the audit tag information it has retrieved for the object:
let UserFactAuditTag(EKLAuditTag)
let EventAuditTag(EKLAuditTag)
let TagInfo (String)
let lTags (List)
lTags = Parameters.AuditTags.GetValue(ThisObject)
if lTags.Size() > 1
{
UserFactAuditTag = lTags.GetItem(1)
EventAuditTag = lTags.GetItem(2)
TagInfo = "Modeler operation details - " + "UserFact: " + UserFactAuditTag + " / Event: " + EventAuditTag + " / Reference Title: " + ThisObject.PLM_ExternalID + " / Reference Description: " + ThisObject.GetAttributeString("PLMReference.V_description")
Trace(1, TagInfo)
}
else
{
Trace(1, "No audit tags found on this object")
}
Validation = true