none
Can't start any 2013 workflow on Document Set item, when it is created using custom ASP item form

    Question

  • Hi,

    I have created very simple ASP New form which looks as follow:

        <asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
            <SharePoint:FormField runat="server" FieldName="Name" ControlMode="New"/>
            <SharePoint:FormField runat="server" FieldName="Title" ControlMode="New"/>
            <SharePoint:SaveButton runat="server" ControlMode="New"/>
            <SharePoint:GoBackButton runat="server" ControlMode="New"/>
        </asp:Content>

    Set it as a New form for Document Set content type using SPD.
    Also I created a new Document Library, where Document Set is one of the content types.
    Now, when I add new Document Set in this library, I can see my simple form.



    After pressing the Save button, I can see new item 123 as expected. 

    After that I select it and try to run workflow (2013 SPD WF) on it, but it doesn't start and shows me the following error: "Something went wrong. To try again, reload the page and then start the workflow"



    And I can see the following error in the ULS logs:

    Failed to look up list item with Id 26 on list with Id 916aff44-93ff-4c93-aeca-b227e249a33a for call to StartWorkflowOnListItem() : System.ArgumentException: Value does not fall within the expected range.     at Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider.StartWorkflowOnListItem(WorkflowSubscription subscription, Int32 itemId, IDictionary`2 payload).

    I can see that item with id=26 exists. At least I could see it using the following link:

    http://mysite/mylist/Forms/Document%20Set/docsethomepage.aspx?ID=26&FolderCTID=0x0120D520005107FFFB3FE12644B0E708E265E4BA8D&List=916aff44-93ff-4c93-aeca-b227e249a33a&RootFolder=%2Frechenzentren%2FServers%2F123&RecSrc=%2Frechenzentren%2FServers%2F123


    **However, if I create new item using standard form, the same workflow starts well.** Workflow is very simple and consists of the only log activity.

    **What I have tried:**

    1. Tried to use the same custom form to create item derived from Item in a list. In such a case workflow starts without any issues. So probably, the issue related only to Document Libraries or Document Set.
    2. Tried to start 2010 SPD WF on this item. It works well. So, probably this issue is related only to new 2013 WF Manager's WF.
    3. Compare all fields of the both items (created by standard and custom forms). The only difference, which I could see is that in the working item, MetaInfo field contains additional value "docset_SkipProvision:SW|True". I tried to add it to the incorrect item, but with no results.

    **My ideas why it happens:**

    1. I should do some additional work in my custom form when it comes to Document Set (SharePoint:SaveButton is not enough).
    2. It is a bug in platform and standard form do something behind the scenes to overcome it (but what?)


    **Does anybody have some ideas, why it happens and what could I try for troubleshooting?** 
    Every suggestions are very appreciated.

    Kind regards, Michael (http://sp2013-blog.com)




    • Edited by MikhailSP Saturday, March 09, 2013 10:29 PM
    Friday, January 18, 2013 11:27 AM

Answers

All replies

  • Still no answer or a suggestion.

    Could anybody repeat the issue or it fails only for me?

    Tuesday, January 22, 2013 9:21 AM
  • I have just got an answer for this question from MSFT.

    He said:

    "This is a known issue that's being investigated. Document Sets generate events differently from other SharePoint content, and today these events do not flow properly for workflow."

    Regards, Michael (http://sp2013-blog.com)

    • Marked as answer by MikhailSP Wednesday, March 20, 2013 7:00 PM
    Wednesday, March 20, 2013 7:00 PM
  • Fails for me too. I cant initiate a workflow when a document set is created automatically. I am doing this primarily for Office365/SharePoint Online. Also, I am using designer workflows. Not sure if it is same thing you are referring to as well.

    The workflows initiate when I add a document to the document set, which is not what I am looking for. And moreover that workflow on the document is only visible inside the document set. Not on the document set list.

    I hope it helps.



    • Edited by tech.prasad Tuesday, September 24, 2013 10:00 PM
    Tuesday, September 24, 2013 9:54 PM
  • Is there an update or a fix from Microsoft on the initiation of workflows when a document set is created? What are the suggested alternatives at this time.

    Thanks

    Monday, December 02, 2013 11:44 PM