none
Workflow to write a manager fails in Forms library

    Question

  • Hello,

    I have a SharePoint Designer workflow that is trying to write a manager into a forms library but the action never seems to happen.  The workflow goes into a suspended state after some time.

    Here is the error message in SharePoint prior to going into a suspended state.

    Activity in progress

    Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP BadRequest to http://our.host.header/ITLocal/_vti_bin/client.svc/web/lists/getbyid(guid'98ef8d16-3e04-45df-8568-e1c3b2a9ff4b')/Items(134) Correlation Id: f868af9b-66c2-8cd2-ba5e-4dda19b67d54 Instance Id: 6548cf3c-d420-4c87-884c-779ac064c875

    after it suspends I get this error.

    RequestorId: f868af9b-66c2-8cd2-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentNullException: Value cannot be null. Parameter name: Input   at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context)   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

    Originally I was trying to pick up the manager info from the InfoPath form and that seemed to work fine because I could email myself the manager info that I published to a ManagerID column.  But when I would try to write it to a column in the form library then it wouldn't work.  After many attempts at modifying the manager account info (like stripping claims portion, stripping domain portion, using the ID, etc) I finally skipped all of that where I get the info and I tried just writing a manager that I manually picked in the workflow.  Still it wouldn't work.

    Then I tried to do this on a standard document library in the same site collection, same sub-site, and it worked just fine. I have even gone so far as to delete the column in the form library and re-create it, just in case.  That didn't work either.

    Do any of you know why writing to a People and Groups field in a form library with a SharePoint Designer 2013 workflow doesn't work while it does seem to work when writing to a standard document library?

    Thanks,

    Eric

    Tuesday, April 11, 2017 10:30 PM

All replies

  • Hi,

    If you remove the workflow step about setting people picker value, will this issue occur?

    Could you provide a screenshot about your workflow steps?

    While you update people picker field using designer workflow please make sure it has employee Domain and username (Domain\Username).

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, April 12, 2017 7:56 AM
    Moderator
  • Hi Dean,

    If I remove the workflow step about setting the people picker value then the workflow runs fine. In fact if I leave the workflow action "Update item in Current Item" but have it update something besides the people picker then it works fine as well.  I had it update two columns that were type "Single line of text" anyway, I'm not sure on other data types.

    Right now the workflow is very simple.  In fact the only reason for most of the actions and conditions was because I have been trying to troubleshoot this problem.

    In the first step I take the ManagerId from the list column (promoted from InfoPath publishing) and I assign it to a variable local to the workflow.  The info from the InfoPath field only lets me get it as a string and my workflow variable is also just a string.  Still, the workflow seems pretty smart in that it detects that the string I have (workflow ManagerId) is a user account and when I use it in the email it offers to let me return the user account, display name, or user ID.  I have tried each of those as well, but it still doesn't work.  It would return correct info in the email step, but not when updating the column.

    As I mentioned before, I tried removing the claims portion of the user account.  That is the second step (condition and action).  That also didn't work.

    I have also tried picking an individual person from the people picker in the workflow designer for the update step, just in case it had something to do with my "string" variable.  That also didn't work.

    I'm doing all of this because I couldn't find a way to promote a people and group field from InfoPath to SharePoint without it being defaulted to a string field.  I really wish InfoPath would just do that elegantly but instead it seems the only solution all over the internet is this hacky method.

    This is a SPD 2013 workflow, with SP2013 on premise installation, with InfoPath 2013.

    SPD is version 15.0.4849.1000

    SharePoint is version 15.0.4885.1000 (Dec 2016 CU)

    Thanks,

    Eric


    Wednesday, April 12, 2017 6:04 PM
  • I have found that it works just fine with a workflow on the SharePoint 2010 workflow platform. I suppose this at least allows me to continue with the project, but it sure would be nice if a SharePoint 2013 workflow would work.
    Wednesday, April 12, 2017 7:21 PM
  • Hi,

    Is the ManagerId column a People Picker column in InfoPath form?

    How you update list item?

    Here are my test steps:

    1. I created a list and clicked Customize Form, created a Person/Group Picker column named “ManagerId” in InfoPath form, then I published this form.

    2. In the list view, I created a Person and Group column named “test”.

    3. I created 2013 designer workflow to set “test” column value to “ManagerId” column value.

    It works fine, the result:

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, April 26, 2017 10:49 AM
    Moderator
  • Hi Dean,

    I don't really know what I did to fix it, but it is working now on the SPD 2013 platform.  Strangely I had it working on the SPD 2010 platform.  Also, on the SPD 2013 platform I know that the first steps to get the manager string from the promoted field must have been working okay because I was emailing myself that info and I could see it.  I'm guessing something was wrong with the update list item action.  Along the way I deleted the action, closed SharePoint Designer, re-opened SPD, and then added the update list item back in.  I think maybe that got things going, but I'm not completely sure if that is what got things going.

    I have seen SPD do weird things before.  I recently was trying to delete an action and it wouldn't delete out of the designer.  After I closed and re-opened I could see that the delete actually worked even though the "if"condition didn't disappear initially.  Maybe something strange like that was going on.

    Thank you for your help though.  Your steps are actually exactly was I had done already.  Yes, the ManagerId column was promoted from a people picker in SPD.  I'm curious though, in your last screenshot it looks like the presence box is appearing next to your name on both the ManagerId field and the test field.  Were you able to promote your InfoPath manager field straight to a SharePoint people and groups field?  For some reason I couldn't get this to work.  I could only promote to a plain text field, which is why I was trying to copy that domain/username from the text field to a SharePoint people and groups field with the workflow.

    Thanks,

    Eric

    Friday, April 28, 2017 10:10 PM
  • Hi,

    It’s hard to say why workflow doesn’t work sometimes. You need to do deep research in your environment to figure out the root cause.

    What I have done is:

    1. Click Customize Form button list.

    2. Add a Person/Group picker in InfoPath form.

    3. Publish InfoPath form.

    It should not change the column type after you publish form to list. Could you provide your detailed steps?

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, May 2, 2017 2:10 AM
    Moderator