Redwood Documentation

Product Documentation

 

›Locks and Events

RunMyJobsAutomation Concepts

Automation Concepts

  • Central Scheduling Concepts
  • Automating Processes Across the System Landscape
  • Processes, Chains, and History
  • Queues and Process Servers
  • Workload
  • SAP Systems
  • Events and Event Definitions
  • Scheduling
  • Applications
  • Editing Objects in XML

Locks and Events

  • Prevent Simultaneous Execution of Processes
  • Creating Locks
  • Creating Event-Driven Schedules with Events

Documents

  • Documenting Code, Procedures, and Messages with Documents

Applications

  • Organizing Processes in Applications
  • Creating Applications

End User Overviews

  • End User Interfaces
  • Process Monitors Overview
  • Process Monitors Overview Columns
  • User Message Monitor
  • Designing User Message Forms
  • User Message Monitor Columns
  • Interacting with User Messages
  • Feeds

Managing Output Formats

  • Managing Output Formats

Regular Activities

  • Regular Activities for Redwood Server

Promoting Objects

  • Migrating Objects with the Promotion Module
  • Exporting Redwood Server Objects
  • Export Rule Sets
  • Creating Export Rule Sets
  • Importing Objects
  • Importing Redwood Server Objects with Imports
  • Using Import Rule Sets to Customize Imports
  • Importing Objects with Import Rule Sets
  • Creating Remote Systems
  • Promotion Reaction Processes
  • Integrating Redwood Server Promotion into SAP CTS+
  • Pusher Process Definitions for SAP CTS+ Integration

Backup and Recovery

  • Backup and Recovery of Redwood Server
  • Database Backup
  • Restore Data from Backup

Reference

  • Managing Output Formats
← Prevent Simultaneous Execution of ProcessesCreating Event-Driven Schedules with Events →

Creating Locks

Locks prevent simultaneous execution of specific processes; there are three types of locks, simple (the process that holds the lock runs exclusively), counted ( <n> processes can hold the lock and run simultaneously), and sharedExclusive (locks have a count, defaulting to 1, allowing no more than one process to run concurrently. A process that has gained hold of one or more counts of a sharedExclusive lock will only ever release them again once it has reached a final status. When two or more processes have the same sharedExclusive lock and one of them has reached status Running, has left too few lock counts for the others to start, will prevent the other jobs waiting on the lock from starting until it has reached a final status. When multiple processes wait for a lock, all processes are re-scheduled once the lock is released and one or more of then get hold of the lock, depending on the available lock type, the number of available slots in the counted lock or the number of counts consumed by the job(s) that managed to get hold of the sharedExclusive lock, while the others are re-scheduled to LockWait.

Locks are part of the Definitions section in the navigation bar.

Simple Locks

Simple locks are exclusive, only one process can hold a lock at any given time.

Counted Locks

Counted locks allow you specify how many processes can hold the same lock simultaneously. The lock has a specific number of counts that can be held by processes. Each process that uses the lock attempts to get hold of a specific number of lock counts; if it succeeds it starts running and keeps hold of the lock counts until it reaches a final status. Note that if the value on the process definition exceeds the value on the lock, the process will never run.

Example 1: A lock has 40 lock counts and three processes are about to attempt to get hold of the lock. Process A requires 5 lock counts, B requires 30, and C``10. Process A gets hold of 5 lock counts, B gets hold of 30, and C is set to status LockWait as too few lock counts are available; it has to wait for either A or B to reach a final state before it can attempt to get hold of the lock again. By the time B reaches a final state, process A is still running, processes D and E (both requiring 15 lock counts each) are waiting with C for the lock. The system treats all 3 requests sequentially, all three are rescheduled as soon as B releases the lock counts, these are then distributed on a first come, first served basis.

Example 2: A lock has 40 lock counts, process A is holding 15, so 25 are available. Process B is scheduled and requires 26 lock counts, it is set to LockWait. Processes C is scheduled and requires 10 lock counts, it is set to LockWait since processes B is in LockWait and was the first of the two to request the lock ( first come, first served ). Processes B and C will start simultaneously as soon as A has released the lock.

sharedExclusive Locks

This type is similar to the counted lock feature. The lock has either a specific number of lock counts or an unlimited number. Processes request either a shared or an exclusive hold on the lock. A shared hold always equates to holding 1 lock count and an exclusive hold equates to holding all lock counts.

Lock Contention

Locks are typically used when you want to prevent two processes of a single process definition from running simultaneously. It is not recommended to use locks to restrict the number of concurrent processes, use queue limits in this case. When a lock is freed, all processes waiting for this lock will be rescheduled and the first process to get hold of the lock will force all other processes attempting to get the lock to be rescheduled again, this can have consequences on performance when many processes are waiting on a lock. If you are planning on having many processes wait on a lock, use queue limits instead. You can specify a default queue for a process definition and set the execution size of the queue to a low number - with a great number of processes, this will considerably increase performance.

Context-Menu

Locks support the following context-menu actions:

ActionDescription
Edit SecurityEdit the security of the lock
DuplicateMake a copy of the lock to create a similar one
DeleteDelete the lock
Export > ExportExport the lock into a CAR file
Export > Export with related objectsExport the lock into a CAR file including referenced objects
Promote > Promote to systemPromote the object to a remote system
Promote > Edit further then promoteEdit the export rule set prior to promoting
PromotePromote the lock to another Redwood Server instance
EditEdit the lock
Expand AllExpand all locks in the current filter
Show permalinksShow links that can be used from third party applications to link to the object
Add to navigation barAdd the current object to the navigation bar
New lockCreate a new lock
Filter > New FilterCreate a new lock filter
Filter > Edit FilterEdit current lock filter
Filter > DeleteDelete current lock filter
Filter > Duplicate FilterCreate a copy of the filter
Filter > Export FilterExport the filter into a CAR file
Filter > Add to navigation barAdd the filter to a navigation bar
Filter > Create filter from searchCreate a filter from the current IntelliSearch query

Finding Locks

You can search for locks using filters and the Search Locks box on the Locks tab. This box is known as the IntelliSearch box and located under your username on the top right-hand side of the user interface. Filters allow you to specify a list of objects with static criteria. IntelliSearch allows you to specify complex queries in a simple way using prefixes. Prefixes are used to specify which property you are searching in and have short as well as long syntaxes. For example, if you want to display all locks with the term import in the comment, you would use the search criteria as follows:

c:import

You can search more than one property, as follows:

c:import n:Bi
note

No spaces should be entered before or after the colon (: ).

See the Advanced Object Search for more information.

The following table illustrates the available prefixes for locks:

PrefixesDescription
n, namesearches the name property
c, comm, commentsearches the documentation property
d, desc, descriptionsearches the description property
a, applicationsearches the application property
cb, changedbefore(internal) search for locks that changed before a certain ISO-8601 period

Security

PrivilegeDescription
Lock.CreateCreate locks
Lock.DeleteDelete locks
Lock.EditEdit locks
Lock.ViewAccess locks

You can grant privileges on two levels, Access and Admin; a privilege granted on Admin level allows the grantee to grant the privilege to other users. These privileges can be granted per partition or system-wide.

The Security tab allows you to specify which users can access, edit, and delete the lock.

  • Granting and Revoking System Privileges
  • Granting or Revoking Object Privileges

Procedure

Creating a Lock

  1. Choose "Definitions > Locks".
  2. Choose New Lock to create a lock.
  3. Fill in the details, refer to the section below.
  4. Choose Save and Close to save the lock.

Lock

  • Name - The name of the lock.
  • Application - The name of the application used to group this object.
  • Description - An optional description of the lock.
  • Documentation - An optional comment of the lock.

Assigning a lock to a Process Definition

Example

Choose "Definitions > Locks" in the Navigation bar. Choose the New Lock button and fill in these values:

Lock

Name: DataWareHouseLoadRun
Description: Data Warehouse load is running
Documentation: The data warehouse is being loaded. For data warehouse consistency, this process cannot be run concurrently.

See Also

  • Locks
← Prevent Simultaneous Execution of ProcessesCreating Event-Driven Schedules with Events →
  • Simple Locks
  • Counted Locks
  • sharedExclusive Locks
  • Lock Contention
  • Context-Menu
  • Finding Locks
    • Security
  • Procedure
  • Creating a Lock
  • Assigning a lock to a Process Definition
  • Example
  • Lock
  • See Also
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |