Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
L2PPhysicalElement | PLM Entity |
Read | The physical element (It is null if no physical element is
created).
|
Severity messages:
- Severity= 0 the treatment is to be continued (no message).
- Severity= 1 the treatment is to be continued and only a warning
raised.
- Severity= 2 the treatment is supposed to be undone.
If the output Boolean of business rule is TRUE, the physical
component instance name is synchronized with logical.
Sample
The following sample illustrates the syntax of the business rule:
- If the instance name of the physical component matches
Instance Name To Change
, the physical component's instance name is synchronized with the logical component's instance name. - If the instance name of the physical component is different from the logical component's instance name, there is no synchronization between the two instance names.
In both cases, a message indicates the outcome of the synchronization.
let sName(String)
let PhysVPMInst(VPMInstance)
let bValidation(BOOLEAN)
let sMsg(STRING)
let severity(INTEGER)
let LogInstName(String)
set PhysVPMInst = Parameters.GetAttributeObject("L2PPhysicalElement")
set LogInstName = ThisObject.Name
if(PhysVPMInst <> NULL)
{
sName = PhysVPMInst.Name
if( sName == "Instance Name To Change")
{
bValidation = true
sMsg = "Instance Name will be modified"
severity = 1
}
Else
{
severity = 2
bValidation = false
sMsg = "Modification of instance name of this component forbidden"
}
}
Validation = bValidation
Parameters.Message = sMsg
Parameters.Severity = severity