SharePoint Designer 2010 Workflow "Collect Data from user" errors out with "value not in range"

Answered SharePoint Designer 2010 Workflow "Collect Data from user" errors out with "value not in range"

  • Wednesday, December 29, 2010 7:59 PM
     
     

    Here are the steps i'm following.

    1. Create new reusable workflow

    2. Create two associated columns, both people pickers

    3. Create new workflow step

    4. create new workflow action -> collect data from user

    5. Add two fields to collect data from user, both people pickers

    6. run workflow, it will error out at step 5. I have logged to history above and below that step, confirmed to error out there

    I have tried this repeatedly but no matter how many times I make a new workflow, it will error out at this step. I tried the following:

    1. Create new workflow

    2. Create new step/action collect data from user

    3. ask for only ONE field, a people picker

    4. Run workflow, task action complete successfully, workflow completes successfully.

    5. Add a second field to step 3, so now "collect data from user" has two fields on it, both people pickers

    6. Run workflow - it errors out again at that step.

    Can collect data from users not have more than two people fields? Each time it errors out the logs show "Value not within expected range". Please advise.

All Replies

  • Wednesday, December 29, 2010 9:01 PM
     
     

    I just re-created everything you said in the first scenario except that I only created one Association Column.  Why did you create 2?  What are you doing with the association columns?  In mine, I created to People Pickers in the Collect Data form, but I assigned the task to the People Picker association column from step 2.  I have nothing to use the 2nd association column for.  With this setup, the workflow ran and created a task for my Assignee (person chosen in the list for the association column).  The task had a form with a Title field and 2 People Pickers.  I filled out all 3 fields, clicked "Complete Task," and everything completed as expected.

    I added a 2nd association column just to be sure, and it made no difference.  I also learned that if you assign the task to a People Picker field that allows multiple values, the task gets created without being assigned to anyone even if you only choose one user.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force

  • Wednesday, December 29, 2010 9:25 PM
     
     

    What I am doing is I have LIST A, in LIST A, when I associate the Workflow to it, I will have the two association columns, Person A and Person B, that came from the workflow. I want the workflow to kick off such that the initial task will be assigned to a SharePoint group, "Communications Staff", and they are to assign who the Director and Manager are for this particular task.

    So, the first task will be asigned to a SharePoint group. It should allow for two people to be selected. Once selected the worfklow will populate the two assocation columns, that will be appended to LIST A, with what is generated in the task. As the workflow progresses, new tasks will be assigned to Person A and Person B as needed.

    I have gotten this all to work just fine if "Collect Data from a user" only asks for one person. When it asks for two people, it errors out.

    Were you able to complete the task?

  • Wednesday, December 29, 2010 9:43 PM
     
     

    Yeah, all my tests worked, but I didn't know what you were doing with the association columns.  Is this a fully-circular event?  The association columns get added to the list item where the workflow exists.  For this workflow to kick off, a list item must first be submitted to List A.  So, are you saying that when someone submits an item to List A, they are ignoring the two Association Columns?  Is this the flow?

    • Random user creates item in List and does not fill out the Association Columns
    • Workflow starts and creates a Collect Feedback from User task assigned to Communications Staff.
    • One person from Comm staff completes task by choosing a user in each Person field of the task
    • Task complete and initial workflow continues
    • Initial workflow updates initial item created in 1st step using "set field in current item" and sets each association field to the corresponding Person field from the task

    I built the rest of the workflow as stated above, and it all worked very nicely EXCEPT for the fact that I was able to complete the task by a user not in the Comms group, and this user only has Read access on the site.  that is a separate issue for now, but everything else works perfectly.  It's actually kind of a neat exercise, especially when using the "collect" variable to associate the correst task for setting the list item field values.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • Wednesday, December 29, 2010 9:57 PM
     
     

    Yes, that's the flow. The two association columns on List A are populated during the workflow with the "Collect Data From User" action. Although they could be populated on item creation in List A, they would be overwritten by the workflow.

    I'm at a loss as to what's happening then. I did that exact scenario and it errors out when I add the 2nd people picker to the "Collect Data From User" action. SPD adds it to the already created content type, and the content type adds the site column and adds it to the Tasks list. All that works, so I can't understand why i'm getting "Value not within expected range" error from the logs. That error normally means there is a column mis-spelled, but in this case, i'm entering it directly into SPD and i'm only entering it once, in the "Collect Data From User" action where I specify the fields for the task. I am throwing out messages into the history log before and after the "Collect" task so I know the error is there.

    THe really odd thing is in the actual Tasks list, the task shows as "In progress" but the values in both people picker fields are populated with what I entered. So the data is getting into the Task list item but the task itself is not completing in the workflow. As if the task ID is not getting sent to the workflow parameter "collect".

    Any pointers where I might find something that may cause this?

  • Wednesday, December 29, 2010 10:11 PM
     
     

    Wait, hold on.  Clarify these statements:

    "THe really odd thing is in the actual Tasks list, the task shows as 'In progress'"

    The task list should not say In Progress - it has no workflow on it - unless you're talking about the built-in Task Status column.  Mine never says In Progress.  It goes from Not Started to Completed.  There is no reason for it to say In Progress, because there is nothing that changes the status column to that value.  Are you saying that you created a secondary workflow on the Task list?  You shouldn't have needed to.

    "the values in both people picker fields are populated with what I entered"

    Oh, so you're saying that the task IS created and that you ARE able to complete it?  I don't think you ever said this.  You just said that it errors out at Step 5, but 5 only said, "Add two fields to collect data from user, both people pickers."  I thought you meant it errored when you added them or when you tried to publish the workflow.  I didn't knhow you were getting to the point of actually completing the task WITHOUT errors.  So, when and where do you see the error?  When you click "Complete Task" or back in the workflow history of List A or somewhere in the Task List?  Where and when does this error manifest itself?

    "As if the task ID is not getting sent to the workflow parameter 'collect'."

    Ok, so you have two "Set Field" steps in the first workflow that come after the Collect Data action, but it's never logging that this action completse?  What is actually logging?  I don't have any steps before my Collect Data action, but I do have one after Collect Data and both "Set Fields" actions.

    What are the names of your Association Columns and the Task columns?


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • Thursday, December 30, 2010 12:28 AM
     
     

    Yes, I am saying that the task list shows as "In Progress". It does not show as "Complete". Your task shows as "Complete" because the task in the workflow was completed, my task is being started, the task status gets updated to "In Progress", and then the task work is done, and when done the status is supposed to go to "Complete" but never does because it errors out. Your task IS going to "In Progress", it just is happening so fast you never see it. There is no secondary workflow. WHen I created the workflow in SPD, I set the task list to be Tasks. The "Outcome" is blank. The "Workflow" field in the parent list, List A, shows as "Error Occured"

    Yes, I am saying the task is created (automatically by the workflow), I am able to enter data, the data is saved to the task item list, the task never changes to "Complete" and the workflow never progresses beyond this action. 

    Here's the steps when the workflow is launched. The workflow is published, it is assigned to a list, the associated fields do get added to the list.

    1. ITem is added to List A

    2. Workflow is set to launch on user demand, I launch workflow.

    3. Task is created in tasks list, form asks for two people in two seperate people picker fields

    4. Two users are selected from AD and found

    5. Click "Complete Task"

    6. Page refreshes, task status (Updated from workflow automatically) shows as "In Progress"

    7. Click on task again and the people entered do show up in both fields

    8. Click back on original item in LIst A, workflow status shows as "Error occurred". The two associated columns do not get set to the values entered in Collect Data From User.

    So the error is occuring when I click "Complete task". THe tasks list item is updating but something is not getting updated to the workflow and here is where the error occurs.

    I have three actions in one step. Action 1 is the "Collect data from users", action 2 is "Set field in value" where we set Person 1 = Task Field Person 1. Third action is "Set field in value" where we set Person 2 = Task Field Person 2.  Fields Person 1 and Person 2 are both the associated columns from the workflow. 

    Does your workflow history list show all steps as completing and your columns in List A get populated?

  • Thursday, December 30, 2010 12:41 AM
     
     

    "Does your workflow history list show all steps as completing and your columns in List A get populated?"

    Yes, it all works, and my history log is correct.  I have the same 3 actions and am logging a comment after each action.  My 2nd and 3rd comments are dynamic strings that say, "Person 1 set to [CurrentItem:Person 1(Display Name)].  I am even using Name (Picture and Details) for the formatting of my Person field in List A, and it all shows up very nicely.  I see the user's picture and name hyperlinked to their MySite profile, and I can continually do it over and over with different names.

    I'm skeptical on the below comments:

    "Page refreshes, task status (Updated from workflow automatically) shows as 'In Progress'" and

    "Your task IS going to "In Progress", it just is happening so fast you never see it."

    Do you have physical proof/evidence of this?  I would just like to see it so that I know for sure.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • Thursday, December 30, 2010 1:11 AM
     
     
    I can record a video of the steps, how does that sound? Can I post it here? I don't see an option to upload a file.
  • Thursday, December 30, 2010 1:19 AM
     
     
    I can record a video of the steps, how does that sound? Can I post it here? I don't see an option to upload a file.


    No, I wasn't referring to what you're seeing.  I'm referring to the notion that the status field of the task is updated by the workflow in the other list.  I'm not doubting at all what you see.  The quotes I showed were i reference to your assertion on how things work mechanically with this type of workflow task, not just how it was working in your instance. I'm just wanting to see something somewhere that shows the original workflow actually setting the status of the task twice successively.

    One way you can check this is to turn on version history for your Tasks list and then check the version history on a new task.  In my version history, it shows this:

    1. 1.0 = Initial creation by System Account (done by the workflow)
    2. 2.0 = Modification by my user, and the only fields that changed were the two Person fields
    3. 3.0 = Status set to complete and % Complete set to 100 % by System Account (done by the workflow)

    At no point does it get set to In Progress, which is what I was trying to figure out.  Can you see if yours is like mine except for 3.0.  Does it show that System Account set the task to In Progress instead of Completed?  The quote I'm referring to is this one:

    "Your task IS going to "In Progress", it just is happening so fast you never see it."

    When editing regular tasks, they don't move from Not Started to In Progress on their own even if you update the task.  I'm harping on this in case it may help us identify the exact breakpoint.

    One other question just to be thorough.  What is the exact setup of your actions after the Collect Data action?  You gave me the quick explanation, but do you mind writing out the exact syntax, including the way you chose to relate the original list item fields to the associated task?  Thanks!

     


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • Thursday, December 30, 2010 2:30 PM
     
     

    Sure thing. Mine does not go to 3.0, it only goes to 2.0. The 2.0 below is from the workflow that lives in List A. What is below is from the TASKS list item that the workflow created. When you checked your version history, in step 2.0, it didn't say Status In Progress? Hmm, that's interesting. Mine certainly is going through an "in Progress" stage but never gets to "Complete".

    Regular tasks are not under the control of a workflow, so they wouldn't go from "Not Started" to "In Progress" or make any changes to the task list item that the user doesn't intiate. The workflow is what is changing that status and eventually changes the Outcome column as well. My outcome column never gets changed to"complete" either.

    The exact step after the "Collectr data" is a log to history action that never gets logged. There is a log to history action before collect data that is firing.

    This is from the task item after I hit "Complete Task". The status is in "In Progress" and the workflow itself has errored out. "Task TAg Coordinator" and "Task tag director" are my two task columns that are entered into the content type associated with teh collect data action.

     

    2.0
    12/29/2010 2:41 PM Edit
    asaslaw
     
    Status In Progress
    Task Tag Coordinator asaslaw
    Task Tag Director asaslaw
    1.0
    12/29/2010 2:40 PM Edit
    System Account
     
    Title Please Enter Users
    Priority (2) Normal
    Status Not Started
    Assigned To C & L Staff
    Task Group C & L Staff
    Start Date 12/29/2010
    Workflow Name An Approval

     

  • Thursday, December 30, 2010 3:55 PM
     
     
    Well, i'm about to throw out the computer. I just attempted to make screen shots of a completed workflow that was working just fine, doing the same thing as this with a Collect Data action collecting only one person, one people picker field. It is now erroring out the same way. I didn't change a thing with that workflow. Is there a way to expand the logs to see exactly what value is not within the specified range?
  • Thursday, December 30, 2010 4:14 PM
     
     

    Here is the stack trace. Any ideas what would cause it? There is no way the name of the field is wrong in the list, i'm only entering it in SPD, how could it be wrong?

    WinWF Internal Error, terminating workflow Id# 168a468a-bd4c-49d6-bfc3-02f8f3f5e194 
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Value does not fall within the expected range.     at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName, Boolean bThrow)     at Microsoft.SharePoint.SPListItemCollection.GetColumnNumber(String groupName, Boolean bThrowException)     at Microsoft.SharePoint.SPListItemCollection.GetRawValue(String fieldname, Int32 iIndex, Boolean bThrow)     at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException)     at Microsoft.SharePoint.SPListItem.get_Item(Guid fieldId)     at Microsoft.SharePoint.Workflow.SPWinOETaskService.CompleteTask(Guid taskId, String taskOutcome)     --- End of inner excep... 
    ...tion stack trace ---     at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)     at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)     at System.Workflow.Activities.CallExternalMethodActivity.Execute(ActivityExecu... 
    ...tionContext executionContext)     at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)     at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)     at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)     at System.Workflow.Runtime.Scheduler.Run() 

  • Thursday, December 30, 2010 4:16 PM
     
     

    Create the 2 new columns as site columns.

    When you're adding the association columns, pick the existing site columns.

    When you're creating the task action, DON'T type any column names here at all.

    After you've published the workflow, a new content type will have been automaticaly created.  Go to that content type (site settings).  Add those 2 site columns to the content type.

    Open the workflow back up, and when you click through the task action again, you will see the columns have been added.  Re-publish the workflow.


    Laura Rogers, MCSE, MCTS
    SharePoint911: SharePoint Consulting
    Blog: http://www.sharepoint911.com/blogs/laura
    Twitter: WonderLaura
    Beginning SharePoint 2010: Building Business Solutions with SharePoint
  • Thursday, December 30, 2010 4:32 PM
     
     

    Really? I have to circumvent SPD's built in funcitonality? That's starting to sound very buggish to me. Why would it work for Clayton and not for me? I don't doubt what you are suggesting just curious why I have to go that route to make this work.

  • Thursday, December 30, 2010 7:03 PM
     
     

    Really? I have to circumvent SPD's built in funcitonality? That's starting to sound very buggish to me. Why would it work for Clayton and not for me? I don't doubt what you are suggesting just curious why I have to go that route to make this work.


    You shouldn't have to.  I followed the normal steps, and the association columns were automatically created as site columns.  They were also added to my list when I associated the workflow with that list.  The columns for the Collect Data form were also automatically added to the custom task content type, which means they were automatically added to my tasks list when the workflow first ran and created a new Collect Data task. Laura's steps probably work, too, but the built-in steps you and I have been discussing also work.  I have a working example here in front of me.

    Is there anything else in the 14\Logs or the Application Log of the Event Viewer?


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • Thursday, December 30, 2010 7:16 PM
     
     
    No, no other errors in the logs. Doesn't the stack trace show that this is happening at Microsoft.SharePoint.Workflow.SPWinOETaskService.CompleteTask()? Doesn't that suggest that the completetask method is trying to do something that isn't working and that the fields/content types are not what the issue is? Where does your Outcome column live? Does it live in a content type? Which one? Is it just hidden and I can't see which content type it lives in?
  • Thursday, December 30, 2010 7:57 PM
     
     
    No, no other errors in the logs. Doesn't the stack trace show that this is happening at Microsoft.SharePoint.Workflow.SPWinOETaskService.CompleteTask()? Doesn't that suggest that the completetask method is trying to do something that isn't working and that the fields/content types are not what the issue is? Where does your Outcome column live? Does it live in a content type? Which one? Is it just hidden and I can't see which content type it lives in?
    1. "Doesn't that suggest that the completetask method is trying to do something that isn't working" - Sure, but the key word is "something," and I don't know what that "something" is, so I was hoping there may be more detail elsewhere.  The trace isn't helping us much...
    2. "Where does your Outcome column live" - I can't find it anywhere either.  It's a hidden column, and I'm not sure exactly how it works.  I have it for every item, but it's only populated in the workflow-related tasks.  In my version history, it is never shown as being updated, but the workflow is obviously setting it to Completed as you said.
    3. "The workflow is what is changing that status and eventually changes the Outcome column as well" - Yes, but in no instances does it ever set my tasks to "In Progress."  In your version history, it indicates that YOU initiated the change to set the status to In Progress in 2.0.  I know you didn't manually do it, because there was no way to do it.  In mine, it shows the workflow setting the status in 3.0, and it shows me only setting the two Person fields in 2.0 (no status change).  Strange behavior that's difficult to explain, since we can't see into the guts of the Collect Data workflow process like we can with the OOTB workflows (i.e. Approval, Collect Feedback, etc.).

    My only suggestion at this point is for you to mimic my steps exactly and see what happens.  Here are my details that are slightly different, although it doesn't make much sense for these to matter:

    Association columns:

    • Name = Assignee and Assignee2 (no spaces)
    • Type = Person or Group
    • Required = No
    • Allow Multiple = Yes and No (I set each separately and both work)
    • Allow selection = People only and People and Groups (I set each separately and both work)
    • Choose from = All Users
    • Show field = Name (with picture)

    Collect Data fields:

    • Name = Person1 and Person2 (no spaces)
    • Type = Person or Group
    • Required = No
    • Allow multiple = Yes
    • Allow selection = People only
    • Choose from = All Users
    • Show field = Name (with picture)

    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • Thursday, December 30, 2010 8:53 PM
     
     
    How many times did you try to run the workflow? More than once? I followed your steps. I even created a brand new Tasks list and associated the workflow to that list instead of out of the box Tasks when I linked the workflow to List A. It worked the first time. The task completed, the users got assigned, perfectly. It did not work the second time. The second time it errors out just like before. What in the world would cause that??
  • Thursday, December 30, 2010 8:57 PM
     
     
    Yes, I've run it about 10 times without any errors.  The fact yours runs once and then fails may be a hint.  If you delete all existing tasks in the new task list and run it again, what happens?
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • Thursday, December 30, 2010 9:08 PM
     
     Answered

    Holy smokes, I figured it out. I must admit, I didn't divulge everything that was happening but honestly, I never in a million years thought this would be an issue. There are actually two workflows and lists...So I have List A AND List B. I have Workflow A AND Workflow B. What happened was this:

    • Create workflow A on List A (Associate to Tasks List)
    • Test workflow A
    • Workflow A works completely, all items submit correctly, all tasks complete
    • Create workfflow B on List B (Associate to Tasks List) <--- NO CAN DO!
    • Test Workflow B
    • Workflow B errors out with "value not within specified range" on completetask method
    • Go back and test workflow A 
    • Workflow A errors out with "value not within specified range" on completetask method
    • Pull hair out 
    • Realize that workflows MUST keep an internal count of tasks in a tasks list and as workflow A incremented the number, Workflow B came along to look for the first task and couldnt find it, so it errored out. Workflow A relaunched and looked for it's task, couldn't find it as Workflow B took it but it was the wrong content type so it couldn't be its task.

    Here's the big catch. Even if I remove workflows both lists, LIst A and LIst B, and put the workflow sback on the list, they will STILL error out if I use the same Tasks list that I used previously. 

    Both workflows are now working fine. But is this by design? Are you not supposed to be able to use the same Task list for workflows? I have never heard of that before. When I add a workflow to a list, it says I can choose an existing task list with NO warning about choosing a task list already in use. 

    Could you test this and verify? Or do I have something else odd going on. 

    • Marked As Answer by Allen Saslaw Thursday, December 30, 2010 10:28 PM
    •  
  • Thursday, December 30, 2010 9:25 PM
     
     Answered

    <rant> *sigh* Please divulge all info in the future.  I spent a lot of time working on the repro and with the continual replyies.Remember that we do this in our free time.  In my case, it's while on vacation, but that's my choice - not your problem.  However, do us the favor of stating all information even if it seems unrelated</rant>

    This is what I just did:

    • Created new custom list (Custom2) to go along with my already-existing custom list (Custom1)
    • Since my workflow is reusable, I associated the same workflow from before with Custom2, so it was now associated with the same workflow AND I made sure to associate that instance with the same Task list
    • Created a new item in Custom2, which created the same task in the Tasks list, and it worked normally when completing it
    • Came back and made a new one i Custom1, and it worked end-to-end
    • Created another in Custom2, and it worked end-to-end

    Yes, I agree that it should not be a problem to use the same Task list for multiple workflows like this.  In my case, it still works great, but we do at least have more hints.  Questions:

    • Are your workflows the same workflow being re-used on both lists, or are they different workflows?
    • If different, then how about your Association columns?  Same or different?  What about the Collect Data fields?  Same or different?
    • Does Workflow B on List B _ever_ work?  Have you tried it before trying Workflow A to be sure?

    I doubt there is any sort of internal count - that would be very inefficient and imprecise.  When the WF creates the task, it stores the ID in a variable, and then the ID of the task item is used for associating the task completion back with the workflow actions.  I know you already know this.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Marked As Answer by Allen Saslaw Thursday, December 30, 2010 10:28 PM
    •  
  • Thursday, December 30, 2010 9:43 PM
     
     

     

    • I never thought in a million years having two workflows would have been an issue. The site also has several lists, custom infopath forms and other items that any other site might have that I didn't think to mention. I appreciate your time and assistance but honestly, I don't know what to mention and what to not mention. Two workflows on a single site seems rather run of the mill. Apologies for not mentioning it at any rate.
    • Workflow A is entirely different from Workflow B
    • Workflow A and workflow B both use "Collect data from a user" actions and both of them use the people picker
    • Workflow A's content type in Collect data from a user is different than the content type in Workflow B's Collect data from a user.
    • Columns in both content types from previous step are also different.
    • Workflow A on list A is now using Task List A, Workflow B on List B is now using Task List B.
    • Both workflows are working fine, being run multiple times
    • Association columns are different in each workflow as well, but I really don't think the association columns have anything to do with this. 
    Further, I did the following to come to this conclusion

    • Create a new task list, New Tasks. My thinking was that the out of the box Tasks list had some kind of errors in it
    • Assign workflow A in List A to New Tasks
    • Run Workflow A
    • Workflow A works
    • Assign Workflow B in List B to New Tasks
    • Run Workflow B
    • Workflow B errors
    • Run workflow A
    • Workflow A errors
    I then created two tasks lists, assigning each one to each workflow/list and all is well. Im still very curious if you can replicate this.

     

  • Thursday, December 30, 2010 10:00 PM
     
     

    OK, I scrapped the workflow from ListB and created a new workflow by copying and modifying my first workflow so that that it does the same steps but with different fields.  I created new association columns for my list and new Person fields for my task form.  The content type is named differently as well as all the fields being used.  I made sure it was still associated with the original Tasks list...

    Everything worked perfectly still.  All 4 of my Person fields populate with name and picture, the tasks complete, and both original lists get updated with the appropriate users.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • Thursday, December 30, 2010 10:11 PM
     
     

    Well, i'm just not sure what's going on then. I can get it all to work by separating it all out with different Tasks lists. But can't get it to work if I use the same task list, even if it's a brand new task list, just won't work. That is to say, the first workflow will work fine, even if I run it multiple times, but when I add a second workflow it all errors out, both workflows will no longer run. And the error is the same each time "Value not within specified range". The reason I thought it might be some internal tracking number is the taskid getting passed in the stack trace. 

    All I can think of is if you created a workflow from scratch, like I did, and not copied it. I don't think you'll get any different results just that it would exactly mimic what i'm doing.  Though I do have a reasonable work around now, it would be interesting to see. 

  • Thursday, December 30, 2010 10:23 PM
     
     

    Not much else to do at this point.  You could test copying WorkflowA and adding it to ListB while making sure it was associated with the original Tasks list (or one that A is associated with now) and see if that works.  The only logical thing I can think of is that you have some specific steps in Workflow B that conflict with Workflow A.  Creating a copy of Workflow A and trying it would ensure that you CAN run 2 workflows from separate lists on the same task list, and if you confirmed that, then you would know it's something specific about the differences in your two workflows.  Btw, I actually created a 3rd completely different workflow on List A that starts a full Collect Feedback process, which creates multiple tasks for multiple people all in the same task list, and it works just as expected in conjunction with the other 2.

    As a moderator request, please mark some of these posts as helpful or as answers if any of them are deserving.  This is quite a long thread but currently has no indicators to help others who read the thread.  Thanks!


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • Thursday, December 30, 2010 10:28 PM
     
     
    I sure will, thanks for you help Clayton. I agree there's not much left to explore, if you can't replicate then it's an issue somewhere else. I'll mark some postings as answers, thanks again!
  • Wednesday, March 27, 2013 10:41 AM
     
     

    I know this post is very old. But I'm running into the exact same error. But what is more surprising is the fact that I've only one workflow attached to one list. Here is my stack trace - 

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Value does not fall within the expected range.     at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName, Boolean bThrow)     at Microsoft.SharePoint.SPListItemCollection.GetColumnNumber(String groupName, Boolean bThrowException)     at Microsoft.SharePoint.SPListItemCollection.GetRawValue(String fieldname, Int32 iIndex, Boolean bThrow)     at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException)     at Microsoft.SharePoint.SPListItem.get_Item(Guid fieldId)     at Microsoft.SharePoint.Workflow.SPWinOETaskService.CompleteTask(Guid taskId, String taskOutcome)     --- End of inner excep...  

    The error occurs to me when I backup a site which contains the list and workflow from one server and restore it in another server. I've tried deleting the data list, workflow tasks list and workflow associations and recreating them all. Still no luck.

    Any insights?


    NLV - MCTS - Blog - Twitter - In

  • Wednesday, April 03, 2013 11:06 AM
     
     


    I built the rest of the workflow as stated above, and it all worked very nicely EXCEPT for the fact that I was able to complete the task by a user not in the Comms group, and this user only has Read access on the site.  that is a separate issue for now, but everything else works perfectly.  

    I'm interested ins this error. I'm in the same situation. Did you go deeper to understand what appened.
    I must prevent other users to give input. just users from a specified group.
  • Tuesday, April 09, 2013 9:19 AM
     
     
    Same error for me. Have you found a solution?