User Tools

Site Tools


transformations:exclusiveaccess

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
transformations:exclusiveaccess [2021/01/16 07:43] – added image dmitrytransformations:exclusiveaccess [2021/06/19 20:16] craigt
Line 1: Line 1:
-===== Start/finish exclusive access =====+{{ transformations:ExclusiveAccessAction.png}} 
 +======START/FINISH EXCLUSIVE ACCESS=====
 +Category: Workflow / Internal \\
  
-Enforce mutually exclusive access to a resource for simultaneously executed projects (tasks).+\\  
 +=====Description===== 
 +Enforce mutually exclusive access to a resource for simultaneously executed workflows (tasks).\\
  
-The action is intended for avoiding access conflicts when two or more simultaneously executed projects (tasks) attempt to access a resource (e.g. write into a file or web API) that can only be accessed by one project at a time. It's typically used to resolve access conflicts between several simultaneously executed instances of an EasyMorph Server task.+\\ 
 +=====Use cases===== 
 +The action is intended for avoiding access conflicts when two or more simultaneously executed workflows (tasks) attempt to access a resource (e.g. write into a file or web API) that can only be accessed by one workflow at a time. It's typically used to resolve access conflicts between several simultaneously executed instances of an EasyMorph Server task.
  
-The action works similarly to a railroad semaphore. When one project starts exclusive access to a resource using the action, all the other projects running on the same computer and requiring access to the same resource will wait until the first project finishes the exclusive access. Once exclusive access is finished, one from the waiting projects will proceed to access the same resource.+\\  
 +=====Action settings===== 
 +^Setting^Description^ 
 +|Mode|Select whether the action will start or stop exclusive access.  Options:  //Enforce exclusive access// or //Stop\\ enforcing access//. | 
 +|Resource name<sup>*</sup>|Enter a name for the resource.  The resource name is symbolic. It is only used to identify a resource for the action.\\ The name doesn't have to be the real name of the accessed resource. Although, it is recommended to give\\ resources meaningful identifiers for clarity.| 
 +<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\ 
 + 
 +\\  
 +=====Remarks===== 
 +The action works similarly to a railroad semaphore. When one workflow starts exclusive access to a resource using the action, all the other workflows running on the same computer and requiring access to the same resource will wait until the first workflow finishes the exclusive access. Once exclusive access is finished, one from the waiting workflows will proceed to access the same resource.
  
 {{ :transformations:exclusive-access.png?nolink |}} {{ :transformations:exclusive-access.png?nolink |}}
  
-For the access synchronization to work, all the projects that access the resource must use the "Start/finish exclusive access" with the same resource name. If a project doesn't use the action, it won't wait for another project even if the latter uses the action.+For the access synchronization to work, all the workflows that access the resource must use the "Start/finish exclusive access" with the same resource name. If a workflow doesn't use the action, it won't wait for another workflow even if the latter uses the action.
  
 To finish exclusive access to a resource, use the action again but in the "Finish" mode. Make sure that the specified resource name is the same for starting and finishing exclusive access. To finish exclusive access to a resource, use the action again but in the "Finish" mode. Make sure that the specified resource name is the same for starting and finishing exclusive access.
  
-To make the synchronization work, all projects must use the "Start/finish exclusive access" action configured to start access to a resource with the same name.+To make the synchronization work, all workflows must use the "Start/finish exclusive access" action configured to start access to a resource with the same name.
  
-=== Resource name === +A workflow can start exclusive access to only one resource at a timeIn order to start exclusive access to another resourcethe previous exclusive access must be finished by using the action again but in the "Finish" modeNested locks are not supported.
-The resource name is symbolicIt is only used to identify a resource for the action. The name doesn't have to be the real name of the accessed resourceAlthough, it is recommended to give resources meaningful identifiers for clarity.+
  
-The resource name can be specified using parameter.+After exclusive access is established, it must be finished as soon it's no longer needed. Therefore, when exclusive access is required in workflow, two "Start/finish exclusive access" actions should be used: one in the "Start" mode before accessing the resource, and another in the "Finish" mode immediately after the resource is no longer used or interacted with.
  
-=== Remarks === +If exclusive access is not finished explicitly, it will be finished automatically when workflow execution finishes. In such a casea warning will be produced.
-A project can start exclusive access to only one resource at a time. In order to start exclusive access to another resourcethe previous exclusive access must be finished by using the action again but in the "Finish" mode. Nested locks are not supported.+
  
-After exclusive access is established, it must be finished as soon it's no longer needed. Therefore, when exclusive access is required in a workflow, two "Start/finish exclusive access" actions should be used: one in the "Start" mode before accessing the resourceand another in the "Finish" mode immediately after the resource is no longer used or interacted with.+The action can'be used to synchronize actions within the same workflow. For thatuse the [[transformations:synchronize|Synchronize]] action.
  
-If exclusive access is not finished explicitly, it will be finished automatically when project execution finishes. In such a case, a warning will be produced.+The action can't be used to resolve access conflicts for workflows running on different computers.
  
-The action can't be used to synchronize actions within the same project. For that, use the [[transformations:synchronize|"Synchronize" action]].+\\  
 +=====See also===== 
 +  * [[transformations:synchronize|Synchronize]] 
 +  * [[transformations:wait|Wait]]
  
-The action can't be used to resolve access conflicts for projects running on different computers. 
transformations/exclusiveaccess.txt · Last modified: 2021/10/14 11:18 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki