Customization > Extensibility Through Profiles, Stereotypes, Tag Definitions and Scripts > Advanced extensibility through stereotype scripts and script items > Troubleshooting > My script locks other users out of the model
  
My script locks other users out of the model
While a script is making changes to a model, Modeler locks the items that are being changed.
You can minimize disruption to other model users by ensuring that the script that makes changes to a model appears only within the special transaction functions. Any script within the following functions will make changes to the model through a transaction:
For Diagram Toolbar Scripts use the OnFinished script function. See Script functions, attributes and objects - diagram toolbar button script for adding links.
For Double-Click Scripts use the CommitDoubleClick script function. See Script functions, attributes and objects - double-click scripts.
For Menu Command Scripts use the CommitMenu and AfterMenuCommit script function. See Script functions, attributes and objects - menu command scripts.
For On Drop Scripts use the OnDrop script function. See Script functions, attributes and objects - on drop scripts for items.
For Utility Scripts use the CommitUtility script function. See Script functions, attributes and objects - utility scripts.
Making changes to the model through the preceding functions also ensures that you can undo any changes made. In addition, you can see the changes made by the script without having to refresh your Modeler views.
* 
On Delete and Derivation Script scripts do not have any functions specifically for making changes to the model.