none
Content Organizer and Auto-Start Workflow Issue RRS feed

Answers

  • Hi Kelly,

    The Hotfix hasn’t release so far, but here are 3 workarounds have been offered.

    1.       Define a retention policy for a list content type and have it run the workflow.

    2.       Switch to full-trust code workflow by creating the workflow in Visual Studio.

    3.       With some custom code, create a custom router solution to execute while processing items through the Content Organizer. A sample solution is run workflows on item route.

    Best regards,
    Emir

    • Marked as answer by Emir Liu Wednesday, October 19, 2011 9:42 AM
    Monday, October 10, 2011 7:19 AM
  • I took the Event Receiver route and used this tied to the Document Library type. It is executing as intended:

        public override void ItemAdded(SPItemEventProperties properties) 
        { 
            SPListItem addedItem = properties.ListItem; 
            SPWorkflowManager manager = addedItem.ParentList.ParentWeb.Site.WorkflowManager; 
            SPWorkflowAssociationCollection assoCollection = addedItem.ContentType.WorkflowAssociations; 
            
            foreach (SPWorkflowAssociation asso in assoCollection) 
            { 
                manager.StartWorkflow(addedItem, asso, ""); 
            } 
            
            base.ItemAdded(properties); }

     


    Personal Blog: http://thebitsthatbyte.com
    • Edited by Kelly Rusk Monday, October 10, 2011 5:57 PM
    • Marked as answer by Emir Liu Wednesday, October 19, 2011 9:42 AM
    Monday, October 10, 2011 5:56 PM

All replies

  • Hi Kelly,

    The Hotfix hasn’t release so far, but here are 3 workarounds have been offered.

    1.       Define a retention policy for a list content type and have it run the workflow.

    2.       Switch to full-trust code workflow by creating the workflow in Visual Studio.

    3.       With some custom code, create a custom router solution to execute while processing items through the Content Organizer. A sample solution is run workflows on item route.

    Best regards,
    Emir

    • Marked as answer by Emir Liu Wednesday, October 19, 2011 9:42 AM
    Monday, October 10, 2011 7:19 AM
  • Thanks Emir, I will give these a try.

    Regards,

    Kelly


    Personal Blog: http://thebitsthatbyte.com
    • Edited by Kelly Rusk Monday, October 10, 2011 2:43 PM
    Monday, October 10, 2011 1:16 PM
  • I took the Event Receiver route and used this tied to the Document Library type. It is executing as intended:

        public override void ItemAdded(SPItemEventProperties properties) 
        { 
            SPListItem addedItem = properties.ListItem; 
            SPWorkflowManager manager = addedItem.ParentList.ParentWeb.Site.WorkflowManager; 
            SPWorkflowAssociationCollection assoCollection = addedItem.ContentType.WorkflowAssociations; 
            
            foreach (SPWorkflowAssociation asso in assoCollection) 
            { 
                manager.StartWorkflow(addedItem, asso, ""); 
            } 
            
            base.ItemAdded(properties); }

     


    Personal Blog: http://thebitsthatbyte.com
    • Edited by Kelly Rusk Monday, October 10, 2011 5:57 PM
    • Marked as answer by Emir Liu Wednesday, October 19, 2011 9:42 AM
    Monday, October 10, 2011 5:56 PM
  • Any idea when the hotfix will be released for this issue?
    Monday, April 30, 2012 1:26 PM
  • Hi

    I'm having problems with this also, i'm running two workflows and getting unexpected results. Is there a hotfix available yet for this bug?

    Thanks

    Wednesday, December 5, 2012 2:54 PM