You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Introduction

The JS7 - Lock Instruction specifies the jobs for mutual exclusion, i.e. to limit parallel execution of jobs. Resource Locks in a workflow are used to limit access to resources by jobs and force orders to wait before executing a job until the Resource Lock is released by some other jobs holding the Resource Lock. There are two types of Resource Locks available with the JS7:

  • Exclusive Resource Lock: only one Lock Instruction can hold the Resource Lock at any given time. Any further Lock Instructions that try to acquire the same Resource Lock have to wait.
  • Shared Resource Lock: the Resource Lock is assigned a limit that can be shared by a number of Lock Instructions. Each Lock Instruction carries a weight that counts towards the Resource Lock's limit.

Workflow

In the jdExclusiveLockSerial workflow an Exclusive Resource Lock is used. In this workflow the Lock Instruction holds the Resource Lock and other jobs trying to acquire the same Resource Lock need to wait until the Resource Lock is released. 

To execute the workflow in the folder 06_MutualExclusion please follow the below steps:

  1. Click the folder 06_MutualExclusion and expand the jdExclusiveLockSerial workflow.




  2. To add an order to the workflow click the action menu of the workflow and use Add Order from the drop-down menu.




  3. When clicking Add Order a popup window will appear.
  4. You can add an Order ID or leave the Order ID value empty, it will then use a default Order ID. Click the Submit button.
  5. Add two orders to the workflow to observe that the Resource Locks are acquired by the jobs executing for the first order only while any jobs for the second order have to wait until the Resource Locks are released.



  6. To check the status of the order click the name of the workflow. This will make the Order History panel appear.




  7. From the Order History panel you can verify if the order is successful and finished. Click the Order ID to see log output created by jobs executed for this order.



  8. A log view window will open and the order log will be displayed. This log contains output to stdout/stderr from all jobs executed by the order.
  9. You can download the log file by clicking the Download button from the upper right corner of the log view window. Also, you can expand and collapse the individual job output using the chevron icons from the left upper corner of the log view window.




  • No labels