Commands to limit access to critical regions

You can limit concurrent access to critical regions using locks or semaphores. The commands that create locks or semaphores can affect the host computer or the computers from the IBM RPA Control Center environment.

  • Block Resource (waitLock) command
    Begins the critical region scope by creating a lock reference. After a script starts its critical region scope, no other script can enter its critical region scope if referencing the same lock until the command times out or the script locking the resource unlocks it.

  • Block Semaphore (waitSemaphore) command
    Begins the critical region scope by creating a semaphore reference. After a script starts its critical region scope, the Block Semaphore command increments the semaphore token by one. Any other script that enters his critical region scope referencing the same semaphore increments the semaphore token until it reaches a limit.
    The script that first referenced the semaphore defines the semaphore's token limit. After the last script referencing the semaphore reaches this limit, no other script can enter its critical region scope if referencing the same semaphore until either the command times out or one script locking the resource unlocks it, releasing one semaphore token.
    A semaphore with a token limit of one is the same as a lock.

  • Unlock Feature (release) command
    Ends the critical region scope, releasing the referenced lock or semaphore token.