Wednesday, March 18, 2009

Workflow task: Value does not fall within the expected range

If you get the above error when trying to open a task form in a workflow, then read on!

Here's the situation where I got this error: I have a custom approval workflow where one user adds an order request through an InfoPath form. When the form gets submitted, the "IT Approval" group gets assigned the task to approve or reject the order. Also important is that security has been broken so that only the right people can see and approve the tasks. The whole thing is a bit more elaborate than this, but this is basically all you need to know to understand the problem and hopefully recognize it...

Now, if someone in the IT Approval group goes to check his "My Tasks" page, he sees all the tasks assigned to the group. So far, so good... But when he tries opening a task, he gets an error page displaying the "Value does not fall within the expected range" error message.

I've tried many different things, making sure the IT Approval group had contribute access to the task, read access to the site, the task list and the workflow history, but nothing seemed to work. However, there was one place that I missed: the original document.

So if you're facing this problem and you're using custom security, check your InfoPath form (or any other kind of document that triggered the workflow) and make sure the approval user has read access to this file too. I don't know the exact reason for this, but I guess this is because the workflow is copying fields from the original file into the task form and apparently, this only works when the user can read the original file too.

2 comments:

Anonymous said...

I've also observed this when the specified approver is not a member of the Approvers group for the site.

Anonymous said...

Can anyone recommend the robust Network Monitoring tool for a small IT service company like mine? Does anyone use Kaseya.com or GFI.com? How do they compare to these guys I found recently: N-able N-central it consulting
? What is your best take in cost vs performance among those three? I need a good advice please... Thanks in advance!