Batch Revise (batchrevise)

An opening ID is an entry point used to customize business logic. batchrevise is triggered when a bunch of objects for a certain type is revised.

Recommendation: To cover all possible revision creation scenarios, use both Major Revision and Batch Revise precommit openings.

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

This page discusses:

General Information

This opening ID is a precommit opening. For more information about the specificities of a precommit opening, see Precommit Openings.

Definition Description
PLM Opening ID batchrevise
Customization intent Not applicable
Execution context Server

Input Objects

Note: In the case of a batchrevise operation, source objects and their results can be accessed through the BATCHREVISEMAP parameter.
Important: The custom script applies to the source objects (ThisObject). To access the target object, use the context object parameters. For more information, see the Context Object Parameters below.

Context Object Parameters

Table 1. Business Object Standard Parameters
Parameter Name Type Read or Write Comments
EVENT String Read Any of the supported events.
TYPE String Read Business object type
Table 2. Additional Parameters for batchrevise
Parameter Name Type Read or Write Comments
BATCHREVISEMAP Map Read Map representing the whole content of the batch revise operation. Keys represent the new objects (Relations and Entities) and values are the source objects.
AuditTags List Read Logging event of the transaction.
Important:
  • For a batch revise operation, source objects (values in BATCHREVISEMAP) are read-only.
  • If an object has only read operations, the execution control considers it outside of the transaction to apply execution rules.
  • When a batch revise operation is done on several types at the same time, batchrevise opening is triggered once for each type.

Sample

Let ListTargets(List)
Let SourceObject(PLMEntity)
Let TargetObject(PLMEntity)
Set ListTargets = Parameters.Macros.GetObjectMap("BATCHREVISEMAP").GetKeys()
Set TargetObject = ListTargets.GetItem(1)
Set SourceObject = Parameters.Macros.GetObjectMap("BATCHREVISEMAP").GetValue(TargetObject)
Trace(1, "Execution batchrevise on ", TargetObject.PLM_ExternalID)
TargetObject.setAttributeString("description","revised")
Trace(1, "Execution batchrevise result is ", SourceObject.PLM_ExternalID)
Validation = true