Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

The JS7 - Lock Instruction specifies the number of jobs for mutual exclusion to prevent such jobs from , i.e. to limit parallel execution of jobs. Exclusive Locks in the workflow block the resource and a workflow are used to limit access to resources by jobs and force orders to wait before executing another a job until the locks are not lock is released by some other jobs holding the processlock. There are two types of locks available in with the JS7:

  • Exclusive Lock: only one Lock Instruction can hold the Lock at any given time. Any further Lock Instructions that try to acquire the same Lock have to wait.
  • Shared Lock: the 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 Lock's limit.

In the jdSharedLockParallel workflow shared lock a Shared Lock is used. In the workflow, the lock has a limit through by which it shared the lock instructioncan be shared from a number of Lock Instructions. In the workflow, the parallel execution of jobs is performed with as long as the help of a shared lock and with an assigned limit on the lock.limit of the Shared Lock is not exhausted.

Workflow

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

  1. Click on the folder 06_MutualExclusion and expand the jdSharedLockParallel workflow.




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



  3. On clicking the When clicking Add Order. A  a popup window will appear. .
  4. You can add the an Order ID or leave the Order Id ID value blank empty, it will take the then use a default Order Id to process the OrderID. Click on the Submit button to add the Order.
  5. Add two Orders in a workflow with this you can see as per the limit assign to the lock the parallel execution start and run two Orders orders to the workflow to observe that the locks are acquired by the jobs executing for both order running at the same time in a the workflow.



  6. To check the status of the Order order click on the Workflow name with this new Order history panel will appear. name of the workflow. This will make the Order History panel appear.



  7. From the Order history History panel , you can see verify if the Order order is successful and finished. Click on the Order ID to open the detail logs of executionsee log output created by jobs executed for this order.



  8. A log view window will open and the Order order log will be displayed. The Order This log contains log output to stdout/stderr from all jobs executed by the Orderorder. 
  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 arrow button chevron icons from the left upper corner of the log view window.