- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018 06:37 AM
Hi,
please explain about Lock , how it will works ?? and Don't Copy paste servicenow wiki information.
explain it in real time scenario
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018 07:30 AM
If you use it right, you can set it up that way, but I wouldn't. You can't be sure that access runs first or iphone runs first.
Based on your use case, you don't need a lock.
If you had a case where iPhones were being requested several times an hour, then you might consider one. Let's say you are keeping track of an inventory count of how many iPhones you have. That inventory table has a "unit" and "quantity". I would consider using a lock on the workflow when the workflow gets to the point when it needs to decrement the count from that table. If you had all workflows accessing at the same time, your count would be off for that record. If you use a lock, you ensure only one record is decrementing at a time.
Again, it doesn't sound like you need a lock so don't bother.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018 06:41 AM
It's mean to prevent resource contention issues. if you have multiple workflow contexts all vying for the same resource, lock and unlock allow one context to work on it at a time. The lock prevents any other contexts from running past the lock activity if the lock has been obtained by another WF context.
Example: You might start multiple VMs at the same time and they all want to run something in roughly the same time. To allow a "who go here first?" scenario and let only that workflow update, you use a lock. When that WF is done with the resource, you unlock, and another WF context gets to run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018 06:56 AM
Hi Tomasi,
i have one workflow in Incident , if i set LOCK in that workflow how it works?
OR
i have one workflow in Catalog Item, if i set LOCK in that workflow how it works?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018 06:58 AM
It means that no other catalog items (or incidents) that use that use that same workflow, can get past the lock until the first one releases the lock with unlock.
If you don't have any resource contention problems, then you don't need it and I wouldn't bother using it. It's only needed in rare situations when multiple workflows are trying to update the same records at the same time. This is usually not the case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018 07:08 AM
means i use ABC -workflow in Catalogs( Access, IPhone7s)
if i generated two items at a time ( first time - Access, Second time- IPhone7s) , it will accept first ACCESS, when ACCESS was completed, then after only it will accept second catalog item
i am right??