none
Workflow OfficeTask Problem - Specified argument was out of the range of valid values. Parameter name: additionalNodes RRS feed

  • Question

  • Hello,

    Has anyone seen the error mentioned i the title of this post?  I'm trying to run a samle dynamic workflow provided by Microsoft (ContosoSampleProject), that's to say that my code is exactly the same as theirs.  The error is most likely happening right after onTaskAssigning activity is completed with the given office task.

    The only relevant solution I managed to find on the Internet is mentioned here: http://wss.boman.biz/Lists/Posts/Post.aspx?ID=61

    The guy suggests that this is due to having non-serializable properties/members within a class which would prevnet the workflow engine from "putting the class to sleep" before starting the approval awaiting.  This makes good sense, but I haven't been able to isolate any properties/members within the workflow class that are not serializable. 

    A custom activity library from Project 2010 SDK that grants permission to project is also a part of my assembly.  I don't know if it could be causing any problems.  Again the code that I have is exactly the same (at least I hope after triple checking) with what Microsoft provided.

    Please help if you have any suggestions!  I'll be happy to answer any follow up questions.

    Thank you,
    IK

    Tuesday, September 6, 2011 11:32 PM

Answers

  • I guess I will answer my own question :)  My approval content type was set to "WorkflowTask" in the code while it needs to be set to "PSWApprovalTask", a built-in PS workflow approval form.  So if you ever encounter the error above, there are two possible reasons (of course, there could be more):

    1. Your approval content type is wrong (check the Content Type Id property within the Office Task Activity; the variable it points to should hold a correct Uid string for the PSWApprovalTask on your server).  To get the Content Type Id: on Project Server -> Site Settings -> View All Site Content -> Project Server Workflow Tasks (left-side menu) -> List Tab -> List Settings -> Click on PSWApprovalTask in the content types list -> the Guid will be in the URL string.

    2. Problem with workflow serialization.  Check your workflow class for public members or properties that might not be serializable (usually sharepoint objects like SPUser, SPListItem, etc)  To check if object is serializable, find the class definition in MSDN, [SerializableAttribute] on top of the definition means what you think it means.

    Regards,
    Rockmus

    • Marked as answer by Rockmus Thursday, September 8, 2011 10:59 PM
    Wednesday, September 7, 2011 11:19 PM