Synchronization Options
The Synchronization Options property box in the Simple Synchronization Sequence activity lets you specify a synchronization ID for your sequence. Sequences with the same synchronization ID can run in quick succession.
To configure Synchronization Options
- Add the Simple Synchronization Sequence activity to your workflow definition by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
- Select the activity in the Designer Pane.
- Under Synchronization Options in the Properties Pane, give the sequence an ID. Click the Token button (right arrow) to use tokens to make dynamic Synchronization IDs. Sequences with the same ID will actively wait for each other to finish. It is a best practice to select a Synchronization ID that represents the resource that is shared between the activities in your Simple Synchronization Sequence activities.
- Select This workflow definition to have this activity only synchronize with Simple Synchronization Sequence activities in instances of the workflow definition you are configuring. Select Any workflow definition if you want this activity to synchronize with Simple Synchronization Sequence activities in any instance of any workflow definition.
- Next to Wait for up to, configure how long this sequence will wait for other sequences to finish before the contained activities run. If the other Simple Synchronization Sequences with the same ID do not finish in the given time frame, then the activities inside the sequence will run the risk of encountering an entry locked conflict or similar delay.
Example: If you want to prevent entry locked warnings (and delays) when two workflows act on the same entry, then the Entry ID token is a logical Synchronization ID.
Example: A workflow runs on different documents in the same folder. At one point, the workflow adds a field value to the folder the documents are in. Because multiple instances of the workflow may be running at the same time on different documents, they could run into delays when trying to update the folder's metadata. In this situation, place a Simple Synchronization Sequence activity around the Assign Field Values activity that updates the folder, and set its scope to This workflow definition.
Example: You have two Simple Synchronization Sequence activities with the same ID. The activities have been configured to wait for up to five minutes for the other sequence to finish. If the first sequence finishes at any point during that five minute window, the waiting sequence will immediately run. (E.g., if it only takes the first sequence 30 seconds to run, the second sequence will run after 30 seconds and not wait the full five minutes.) If the first sequence does not finish running in five minutes, the second sequence will try to run anyway. At this point, the activities in the sequence will probably encounter an entry locked (or similar) error and the activity will retry based on the time frame specified in the relevant task error handler.