cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Update Item action that is trying to complete the status of a Workflow Task gives workflow error

We are trying to run Parallel Actions; one that sends a Request Approval notification to the responsible party, and another that waits 48 hours, and if the Request Approval has not been completed, it marks it as Approved and continues with the workflow.  However, when we add the Update Item action that looks for the Title of the Workflow Task in question and tries to mark the Status field as Completed, it gives the generic "An error has occurred in <name of workflow>".

I am new to Nintex and SharePoint workflows in general, is there a way to find out more information on what is causing this?  Has anyone seen this before?  Is there a more efficient way to try to enforce an auto-approval of a task other than using the Run Parallel Actions item and calculating a designated amount of time?  Please let me know if you need additional information to help explain the issue.

0 Kudos
Reply
9 Replies
Automation Master
Automation Master

Re: Update Item action that is trying to complete the status of a Workflow Task gives workflow error

Hi Ben,

you can use automatic task escalation to auto complete the task after a certain amount of time. You can configure this escalation directly in your task action:

In the delegation configuration you can either delegate or complete the task after a certain amount of time.

I don't think you can complete a task by simply updating the task status column. If you want to autocomplete a task where you cannot configure escalation, you can call the nintex web service and use respective method.

Regards

Philipp

Reply
igorsp
Nintex Newbie

Re: Update Item action that is trying to complete the status of a Workflow Task gives workflow error

As Philipp Lucas​ mentioned the Escalation feature is the built-in option for auto-approval but if you want to do anything with tasks created in the workflow I recommend storing task IDs in a variable and calling them by task ID and not the title.

2016-04-18_8-20-28.png

Reply
Not applicable

Re: Update Item action that is trying to complete the status of a Workflow Task gives workflow error

Thanks for the response, Philipp.  However, we tried using a Flexi Task first, since it does have the escalation capability built-in, but we also require the ability to Approve the workflow from within an email (mobile device or computer) and were getting the error "Direct task responses are only valid for Approval tasks." when we used the Approval URL reference in the emails.  So we had to switch to a true Approval/Decline action like the Request Approval.  Now the email approval link works, but the Request Approval action does not have an escalation option which is why we chose to try out the Run Parallel Actions along with it. 

Reply
Not applicable

Re: Update Item action that is trying to complete the status of a Workflow Task gives workflow error

Thanks for the reply, Igor.  I don't believe we have tried storing the ID in a variable yet, and have only tried referencing the default title.  I will try that next and see if we can get past this error.  Thank you for the suggestion.

Reply
Not applicable

Re: Update Item action that is trying to complete the status of a Workflow Task gives workflow error

Igor - it looks like store the Task ID in a variable within the Request Approval action will not work for our setup, since it does not store the value until the workflow task is completed, and right now that is why we are using the run parallel actions item so that it can auto complete that Request Approval action if it does not get approved within 48 hours.

Philipp - does the nintex web service only work with Assign Flexi Task action?

I believe the route we are going to have to take to solve this is by creating a site workflow that looks for any list workflow that hasn't been completed and cancels it, then picks up where it left off.  Thoughts?

Reply
Not applicable

Re: Update Item action that is trying to complete the status of a Workflow Task gives workflow error

Hi Ben,

1. I agree with Igor to store the task item id in variable and then use it to fecth the task instead of task title

2. Why "Request Aproval" Action:

- you menioned about approving the workflow from email. are you referring to Lazy Approval? If Yes then  believe Flexi Task also supports it

3. Working with "Request Approval" Action:

- i am able to update the task status value. I would suggest once try using "Update Multiple Items" action instead of normal "Update Item" action.

Thanks,

NintexGuy

Reply
Not applicable

Re: Update Item action that is trying to complete the status of a Workflow Task gives workflow error

Thanks for the reply, Nintexguy:

1) In my last reply I mentioned that it will not store the task ID in the variable I created until after the Request Approval action is completed.  And that is the issue we are trying to work around, in the case that the task does not get approved or declined within 48 hours, we want to force it along.  So right now, even though the Store Task ID In field is filled out, it does not store it in the variable since the action is sitting in the In Progress state, therefore I can't fetch it.  The variable value is blank.

2) In my first reply I mentioned we are using the Approval URL reference link, not Lazy Approval.  We chose this route because we will have hundreds of people being sent an email for their respective task and we do not want to have to train them on what the keywords are and risk human error when replying.  Right now we just have a link in the task notification that says Click Here to Approve, and it works great.

3) I looked into using the Update Multiple Items action, but doesn't that just give you the option to update multiple list items?  I am trying to update multiple actions within the same individual form.

0 Kudos
Reply
gman
Nintex Newbie

Re: Update Item action that is trying to complete the status of a Workflow Task gives workflow error

Ben,

The real issue appears to be your attempt to modify the task attributes outside the task action that created it. I'm almost certain you won't be able to do this. By running two parallel task, you've essentially created two separate tasks in the task list. Each has to be answered separately, each have a unique ID in the task list, and one cannot be used to modify the other. Tasks are not like regular list items because of the association to the list/lib & workflow from which they are initially created. This association acts like a lock on the task, and until the task is answered - rejected, completed, (options vary), the task item in the task list it is basically locked.

This means you won't be able to modify the task item until after the workflow task action is completed.

Good luck.

0 Kudos
Reply
amolvaidya
Nintex Newbie

Re: Update Item action that is trying to complete the status of a Workflow Task gives workflow error

will not completely solve your problem but this might help. I am referring to your point 1 >>> 1) In my last reply I mentioned that it will not store the task ID in the variable I created until after the Request Approval action is completed

1) Make up some string by using list item ID and some constant. Store this in a variable

2) When assigning tasks set this as the Task Name.

3) Effectively now you have a unique value in the workflow task list Task Name column which is immediately available.

4) In your parallel actions to get the exact task item you can now filter the list based on above Task Name

5) If at all you want to run a site workflow you can store the above variable in another column in the list and use that to identify corresponding Workflow task item

Reply