Skip to main content
Nintex Community Menu Bar

Case when a workflow running at the same time

  • Oct 21, 2016 10:21 AM UTC
  • 12 replies
  • 38 views
  • Translate All

Forum|alt.badge.img+6

Hello everyone,

I have an issue which required your help. I make a formĀ  for purchase request and it linked with a "huge" workflow. My problem come from the fact that if two request was submit in the same time (maybe 2 or 3 second). One of them finish but an error occured for the second. This issue come from an update item action.

Indeed, I make an title with auto-increment id and I think that's the execution of both workflow at the same time is critical because the different action of the workflow cannot be done at the same time.

Does anyone face to this issue and find a solution ?

Br

ThƩo

12 replies

Forum|alt.badge.img+9

From your description I feel that the issue is due to the Auto increment title column.When 2nd workflow triggers before completion of first workflow the "ID" is at discrepancy due to the fact that "ID" for the first workflow is not generated. For testing purpose give hardcoded name to the file and try to trigger 2 workflows at a same time.

I guess you need to map different column instead of ID to make your title. Use this approach to create auto increment column https://www.nothingbutsharepoint.com/2010/06/03/sharepoint-how-to-create-an-auto-incrementing-number-field-for-use-in-a-custom-id-part-1-aspx/

Translate

Forum|alt.badge.img+7
  • Oct 21, 2016 2:57 PM UTC

You may want to try to control the execution of the workflow by having a parent workflow then calling the Start workflow action.

193493_pastedImage_1.png

Translate

Forum|alt.badge.img+6
  • Author
  • Oct 22, 2016 7:54 AM UTC

Hi Jan, I've already try this fix but in my case, this action is so much long and it's not possible in this case.

Translate

Forum|alt.badge.img+6
  • Author
  • Oct 22, 2016 7:56 AM UTC

Thanks, I will try the solution describe in the link and I get back to you;

Translate

Forum|alt.badge.img+14
  • Scholar
  • Oct 24, 2016 8:22 PM UTC

running two instances of the workflow on two different items should be a problem.

... unless the workflow do make updates to the other item as well.

what's the error you get?

how do you implement auto increment?

can you post config of failing update action?

Translate

Forum|alt.badge.img+6
  • Author
  • Oct 25, 2016 10:25 AM UTC

I have followed the tutorial but indeed, he used a workflow to increment the master data list so it's not good in my case.

Translate

Forum|alt.badge.img+6
  • Author
  • Oct 25, 2016 10:35 AM UTC

Hi Marian,

Workflow status : Error occured

More detail : The workflow could not update the item, because it is possible that the columns for this item requires a different type of information.

Process :

List A with a workflow : One item where title = "master" and myid = 1

List B with the main workflow : When an item was created, the workflow start. The workflow automatically get item from List A, item "master" and add "+1" to "myid" and finished by an update item

Translate

Forum|alt.badge.img+14
  • Scholar
  • Oct 25, 2016 2:10 PM UTC

have you checked you get correct result from List A lookup query?

I do not know how do you ensure increment of master record on List A, but I would say this approach can not be reliable since within sharepoint you can not ensure that two lookups into list A made at (about) the same time do not read the same myid value.

Translate

Forum|alt.badge.img+16

I have seen this error happen before when the initiator doesn't have permission to do the update - could that be the case? Also are you making use of commit pending changes as appropriate?

Translate

Forum|alt.badge.img+6
  • Author
  • Oct 27, 2016 4:45 PM UTC

Hi Cassy, it's not the case because all people have access to this library (read) and I even used commit pending changes as appropriate.

Translate

Forum|alt.badge.img+6
  • Author
  • Oct 27, 2016 4:59 PM UTC

Hi Marian, yes the result is correct when I launch a request and after 30 seconds, I launch a second request (I don't have really count but it's approximate). But yes, you're right this approach is not reliable.

To tacle this problem, for the moment, I used the technical ID of item because I think that it was calculated first when you submit any form so you don't have the "lag" between all actions of the workflow (e.g : make an ID in list A, store data and finally update item).

Translate

Forum|alt.badge.img+6
  • Author
  • Dec 30, 2016 9:10 AM UTC

For now, the only solution that I've found is to used the technical ID of the item in my title. With this workaround, Sharepoint is able to update correctly the title.

Honestly, this solution is "dirty" because I don't have the control of this ID. In my case for example, I need to reboot to 0 every years this ID and I can't ...

Hope someone find another tips =)

Translate