| Table plus |
|---|
| applyColStyleToCell | true |
|---|
| heading | 0 |
|---|
| columnTypes | s,s,s,s |
|---|
| multiple | false |
|---|
| columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
|---|
| enableSorting | false |
|---|
|
Syntax | sysLock(lockKey) | Package | system | Alias | | Pkg Usage | lock(lockKey) | |
Description
| Excerpt |
|---|
|
| Creates a named lock. Scripts using the same lock key will be blocked and wait for the current script to release the lock. Note that this does not prevent the issue from being edited or otherwise changed by other means or plugins. This lock only makes sense for the SIL scripts. Locks will be cleared at the termination of the script or when the script currently holding the lock calls sysUnlock(lockKey). Also note also the locks are not guaranteed to be re-entrant. |
Creates a named lock. Scripts using the same lock key will be blocked and wait for the current script to release the lock.
Parameters
| Table plus |
|---|
| applyColStyleToCell | true |
|---|
| columnTypes | s,s,s,s |
|---|
| heading | 0 |
|---|
| multiple | false |
|---|
| enableSorting | false |
|---|
|
Parameter name | Type | Required | Description |
|---|
lockKey | String | Yes | The lockKey is the issue key (Jira) or page id (Confluence), or any unique string to give the lock name. | |
Return Type
None
Examples
Example 1
| Code Block |
|---|
|
sysLock("TEST-123"); |
The lock TEST-123 is now created and can not be acquired by other SIL scripts calling sysLock with the same lock key, in this case 'TEST-123'.
Example 2
Similar to the example above but uses the package.
| Code Block |
|---|
|
use "system";
lock("TEST-123"); |
The lock TEST-123 is now created and can not be acquired by other SIL scripts calling sysLock with the same lock key, in this case 'TEST-123'.
See also
| Filter by label |
|---|
| showLabels | false |
|---|
| max | 25 |
|---|
| showSpace | false |
|---|
| cql | label = "system_routine" and space = currentSpace ( ) |
|---|
| labels | array_routines |
|---|
|
We've encountered an issue exporting this macro. Please try exporting again later.