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

Question

Question

Resolve Workflow Instances from Race Conditions

asked on March 7, 2014

I have a workflow for a client that uses metadata for a document to progress through a series of approvals and processes. 

 

At one step, a report needs to be generated to allow an employee to import data into another system. To do this, we are using an ODBC connection to a XLS. 

 

When the process gets to the part of filling out the XLS file and bringing it into Laserfiche, it follows these basic steps:

  1. Prep tokens with the information needed to be filled in. 
  2. Create Entry - Document to receive the XLS when finished.
  3. Script activity to copy a blank XLS to the location of the ODBC XLS
  4. Insert Data into XLS
  5. Attach document from server to created entry

 

We are noticing that step 3 is sometimes occurring on 1 workflow, while another workflow is between steps 4 and 5. What this causes is a blank XLS file to be brought into the Laserfiche repository. 

 

I want to figure out a way to handle this sequence of activities that will enforce a rule of only 1 workflow instance to be in that stage at a time, and if their are multiple waiting to be in that stage, then to handle how they will determine the order in which they will perform these activities without overlapping each other.

0 0

Answer

SELECTED ANSWER
replied on March 7, 2014

Since you already have a script activity, I think it would be easier to just script the Excel file creation with a unique file name each time and then write to it. It would be better for performance than throttling Workflow to one instance at a time.

0 0

Replies

replied on March 7, 2014

I recommend putting Step 3 inside a Simple Synchronization Sequence that has a common ID for the workflows involved (i.e., don't use a token in the ID).  This is exactly the sort of thing that activity was created to do -- manage access to a shared resource (in this case, the "shared resource" is the location of a file).

 

Alternatively, and I don't know much about your process or using ODBC connections to XLS documents, so I'm taking a shot in the dark here...but it seems like you should be able to create and access the XLS file in a subfolder that was unique to each workflow by using the workflow's Instance ID token.

0 0
replied on March 7, 2014

The Simple Synchronization Sequence was made for that? Interesting, since I have asked several times about this and was told that the Simple Synchronization Sequence would only wait for 60 seconds at maximum when it ran into another instance of that sequence and after 60 seconds, even if the other instance was not finished, the sequence would be entered anyways. That would definitely not help me.

0 0
replied on March 7, 2014

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

 

Please note that I asked this question above and you will see that I have tried the use of the activity you suggested

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

Sign in to reply to this post.