Page tree

What you need to know

The Limit Concurrency action is used to synchronize access to a shared resource. The synchronization can be across multiple instances of a single rule set or across multiple rule sets. Access can be restricted to a single instance or limited number of instances at once. For a complete explanation of the action see the Prinergy Workflow RBA User Guide.

Scenario

You need to maintain a record of all pages approved during the day. The record should include the job and page name, the user who approved it, and the time it was approved. The record should be stored as a CSV file.

The Write Text To File action can be used to produce a CSV file. Assuming it is fine for the names of the pages from different jobs to be interleaved, then just using the Write Text To File action would work most of the time. It will work most of the time because the Write Text To File action contains the retry logic that detects that the file is locked and retries to write multiple times. Assuming there are not too many instances that are trying to update the file at once this will work fine. However, if too many instance attempt to write to the file, some will be unable to access the file and fail.

To make sure that the writes always succeed, you can place the Limit Concurrency action in the rule chain. Thus, the number of instances that run concurrently can be controlled.

  • No labels