Hi,
I have a list (call it List A) with a workflow that runs when a new item has been created.
As part of the workflow, an approver will be assigned a task which will in turn update items in another list (List B)... so far so good.
Users are able to create multiple items in List A, that can update the same item in List B. So when an approver were to approve all tasks related to a specific item in List B, it may have conflicts and incorrect data. (The data field keeps a count).
Real life example is this:
Leave request.
- John Doe submits three vacation requests, each request is for 3 days, 5 days, and 7 days of vacation to be taken.
- John Doe's manager is assigned the task to approve the three requests, and in turn, the manager approves all three requests back to back within a minute.
- the approved request will run a workflow that will update John Doe's Leave Profile, which contains a count to see how many vacation days he has taken based on all approved requests.
The Problem:
I am finding that the values being counted in the Profile is not getting and setting the correct numbers, due to conflicts of when each task will run and update the workflow. The first request will update the profile, but the 2nd request will update at the same time, and thus not capturing the first request.
i.e.
1. In the Profile, the count for number of total vacation days taken is initially 0
2. Request #1 is for 3 days, and will update the Profile to 3.
3. Request #2 is for 5 days, but instead of updating the profile AFTER Request #1 has done updating it, Request #2 will update the profile to 5 - which is obviously wrong since it should be 8.
The potential solution I am thinking is to have in the workflow to check out the Profile as soon as one of the request starts to update it. So do so, I need to check if that Profile item has been "checked-out", if it is, then it needs to wait until it's checked back in.
Is this something that can be done in Nintex Workflow for Office 365?