This shows you the differences between two versions of the page.

Link to this comparison view

action type - lock [2016/09/14 14:19] (current)
Line 1: Line 1:
 +====== Lock ======
 +This Action allows you to create or release a processing lock. Locks are very important when a segment of processing is working with a shared resource that may be accessed by many different processes or users. ​ When a Lock is set any additional attempts to acquire a lock with the same name will block and wait until the lock is released by the actions process that has the lock.  ​
 +One common use case is adjusting balances on Accounts. ​ Let's say your Account [[Table|table]] has a [[Field Type - Currency|Currency Field]] on it called Balance. ​ If more than one set of actions can operate on the Balance at the same time it is possible that one of the actions would not be recorded. ​ If a Lock is placed before the math that adjusts the balance then when two different processes attempt to do the math at the same time one will be forced to wait for the other to complete so that both actions have accurate data.
 +//​Warning:// ​ If a process that already has a lock attempts to require a lock it will block and wait until the processing timeout has been reached because it will be impossible for the resource to become available again during that time.
 +===== Settings =====
 +==== Action Configuration ====
 +=== Lock Name ===
 +The lock name is used to identify the lock.
 +=== Lock Action ===
 +The lock action is the action to perform, either Lock or Unlock. ​ It is generally a good practice to release the lock as soon as possible to minimize the amount of time other processes are waiting for the lock.  The lock will auto release at the end of the action process if it is not explicitly released so therefore no lock can be kept between page loads.
 +==== Describe this action ====
 +Useful as a comment, this description will overwrite the automatically generated description in the [[Action Manager|Action Manager]].
action type - lock.txt ยท Last modified: 2016/09/14 14:19 (external edit)
Copyright WorkXpress, 2020