Advanced Customization > Business Logic Customization > Customizing Workflow Administration > Locking Annotations In Change Workflows > Define a Workflow Robot to Lock Annotations
  
Define a Workflow Robot to Lock Annotations
To lock annotations on a Change Notice after the Change Notice is resolved, insert a new robot in between the “Set Change Notice Resolution Date” node and the “Or” node:
1. Select the new Execute Expression robot from the toolbar.
2. Insert the expression in between the “Set Change Notice Resolution” and the “Or” as indicated below
3. Add a description and name.
4. Enter the following Java into the Expression tab to lock the annotations:
wt.fc.collections.WTSet changeObjects =
wt.fc.collections.CollectionsHelper.singletonWTSet(primaryBusinessObject);
wt.change2.ChangeLockHelper.service.
lockRelatedMaterials(revisedChangeObjects,
wt.change2.ChangeApplicationLock.
LOCK_SUPPORTINGMATERIAL);