Basic Administration > Supporting Collaboration > Workflow Administration > Workflow Management > Out-of-the-Box Workflow Templates > Change Management Workflows > Adding Change Locks to a Workflow Template
  
Adding Change Locks to a Workflow Template
Change locks are intended to prevent modifications to annotations. Use the following steps to add a change lock or unlock expression to your workflow template.
Lock Annotations
Lock annotations after a change object is confirmed, approved, completed, resolved, or rejected:
Create a new expression and enter “Lock Annotations” in the Name field and enter the following in the Expression tab:
wt.fc.collections.WTSet revisedChangeObjects = wt.fc.collections.CollectionsHelper.singletonWTSet(primaryBusinessObject);
wt.change2.ChangeLockHelper.service.lockRelatedMaterials(revisedChangeObjects, wt.change2.ChangeApplicationLock.LOCK_SUPPORTINGMATERIAL);
Unlock Annotations
Unlock annotation after a change object has been revised:
Create a new expression and enter “Unlock Annotations” in the Name field and enter the following in the Expression tab:
wt.fc.collections.WTSet revisedChangeObjects = wt.fc.collections.CollectionsHelper.singletonWTSet(primaryBusinessObject);
wt.change2.ChangeLockHelper.service.unlockRelatedMaterials(revisedChangeObjects, wt.change2.ChangeApplicationLock.LOCK_SUPPORTINGMATERIAL);
For more information, see Change Locks.