Retain an Architecture Number (Precommit at Copy)

You can use the precommit at Copy to customize the business logic to retain an Architecture Number when you create a branch from an existing logical item.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

The precommit at Copy is invoked by default when the user sets an Architecture Number after creating a branch from an existing logical item. With use of this business logic you can customize the rules to set an Architecture Number.

Sample to Define Business Logic to retain an Architecture Number

The following sample describes how to define a business logic to retain an Architecture Number when you create a branch from an existing logical item.

Let TargetObject (RFLVPMLogicalReference)
Let fromAN (String)
Let targetAN (String)
Let fromLogId (String)
Let targetLogId (String)

Set TargetObject = Parameters.Macros.GetObject("NEWOBJECT")

fromLogId = ThisObject.GetAttributeString("logicalid")
targetLogId = TargetObject.GetAttributeString("logicalid")

// New Branch
if (targetLogId == fromLogId) {
    fromAN = ThisObject.GetArchitectureNumber()
    targetAN = fromAN
    TargetObject.SetArchitectureNumber(targetAN)
}