You are viewing limited content. For full access, please sign in.

Question

Question

Simple Synchronization Sequence - Clarification on Purpose (and Feature Request?)

asked on June 30, 2014 Show version history

I have seen conflicting viewpoints from Laserfiche staff on the purpose of the Simple Synchronization Sequence workflow activity.

 

https://answers.laserfiche.com/questions/52072/Resolve-Workflow-Instances-from-Race-Conditions

https://answers.laserfiche.com/questions/46879/False-Simple-Synchronization-Sequence-functionality

 

In response to the request for a use case, please consider the following scenario.

 

A user wishes to build a Case Tracking system in Laserfiche. Upon submission of a Case Intake form, a Workflow is kicked off. The Workflow goes to a database table and retrieves the next "Case Number" from a SQL table. The SQL table only has a single row with the current value.

 

A Token Calculator activity is then used to increment that number by +1 and then an Update Data activity is used to update the table for the next Workflow. This entire set of activities is contained in a "Simple Synchronization Sequence."

In theory, I would have thought that this would allow 5 forms to be submitted simultaneously, and have each Workflow wait its turn for the previous Form to complete, prior to allowing another one to run. In reality, I am getting up to 3 simultaneous forms filing under the same Case Number. I am not using a token as the Synchronization ID, it is a static ID. If you submit one form at a time (with about 10 seconds between each submission) it does increment the Case Number correctly.

 

Is this situation something that should be covered by this activity? Because right now, it doesn't appear to be.

 

 

1 0

Answer

SELECTED ANSWER
replied on June 30, 2014

The simple synchronization sequence is designed to allow short, in-memory locks for workflows trying to access the same entry. Normally, if an entry is locked when WF tries to access it, WF waits 5 minutes (by default, though the value is customizable) and retries. Some customers wanted waits under 1 minute because in their situations, the lock was released almost immediately and they wanted their workflows to move on faster.

 

The activity has no impact on Database activities.

 

How about using a SQL sequence to keep track of the current value and generate the next? It would be able to handle multiple requests at the same time and be more efficient since you wouldn't incur the overhead of a second call to SQL and the token calculation.

1 0

Replies

replied on July 1, 2014

Hi Gareth, 

 

If your question has been answered, please click the "This answered my question" button on the response.

 

If you still need assistance with this matter, just update this thread. Thanks!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.