none
List item created through workflow does not start "new item" workflow RRS feed

  • Question

  • I have got a list with two workflows:

    1. One workflow executes every time a new item is created and sets a column to a particular value
    2. Another one can be manually executed and will in return create a new list item

    What I want to happen is for the list items that are created through the Workflow 2 to also execute Workflow 1 when they are created. However, that does not seem to happen, or at least it doesn't happen consistently. In most cases when I look at the Workflow History of the new items that were created through Workflow 2 there is nothing in the history. When I manually create items then Workflow 1 is started without issues.

    I can't figure out why this isn't working? Does Sharepoint treat items differently when they are created through a workflow?

    • Changed type Mike Walsh FIN Wednesday, February 24, 2010 6:17 AM always use the question type so people get credit for their replies to you
    Wednesday, February 24, 2010 5:48 AM

All replies

  • How do you create a list item? Via Activity or Custom Code.
    Wednesday, February 24, 2010 7:17 AM
  • doesn't matter that the item is created by user interactior or workflow, if the workflow is set to run on item creation it should fire without any problems. are the items created in the same list?

    Wednesday, February 24, 2010 1:16 PM
  • Yes, the item is created in the same list and it is created through a default "Create List Item" activity.

    I just tried it again from the beginning with the same results: a new item that I create manually starts Workflow 1 automatically. If I use Workflow 2 to create a new item it doesn't fire Workflow 1.

    Wednesday, February 24, 2010 9:10 PM
  • Hmmm... I just downloaded the "Useful Sharepoint Designer Workflow Activities" from codeplex and used the "Start another workflow" activity to explicitly start Workflow 1 and that seems to work fine. Unfortunately I have to pause Workflow 2 for 1 minute before calling that activity.

    It's a workaround, but less than optimal because users have to wait for 1 minute before they can continue working with the new item.

    It kills me - I cannot figure out why Workflow 1 is not being executed automatically when the new item is created.
    Wednesday, February 24, 2010 10:41 PM
  • Make sure you are not doing that under System Account. Also check if the Created by for the new item is not System Account.

    Paul Shkurikhin blog.sharepointalist.com
    • Proposed as answer by C.J.Murray Friday, March 23, 2012 9:48 AM
    • Unproposed as answer by Steven AndrewsEditor Monday, July 8, 2013 10:16 PM
    • Proposed as answer by hoanvd1210 Sunday, June 14, 2015 8:07 AM
    Thursday, February 25, 2010 3:34 AM
  • The "Created By" is showing the name of the user that executed the workflow (as it should, I guess). If I throw a 1-minute pause into the workflow then that particular activity shows up as running as the "System Account". Not sure if that makes any difference?
    Thursday, February 25, 2010 10:08 PM
  • I am facing exactly the same problem, the new item get created in the same list but the workflow associated with running on new item create never runs.  The first workflow that creates the items runs under the user who triggered it.  This is bizarre.
    Friday, February 24, 2012 7:59 PM
  • I have the same issue. I have two workflows all created in SPD.

    (Workflow 1) Is set to fire whenever a new item is create or changed

    (Workflow 2) Manual workflow that is used to copy an existing item using the "Create Item" activity.

    After the NEW item was created by workflow 2, I notice that workflow 1 never kicked off which does not make sense if its supposed to trigger when a NEW item is created. So after the "Create Item" activity in workflow 2, I had to basically replicate my workflow 1 logic in workflow 2 which includes field updates which again should trigger workflow 1.  Every once and a while and only on those items that were created by using the workflow 2 we have an issue that when a user goes into the NEW item for the first time and changes something workflow 1 does NOT kick off. But if you go into the item again (edit) (don't even have to change anything) and click ok the workflow then kicks off.  Its annoying.

    As mentioned the in other posts, the new item is created by the user who copied the request.

    So I went on our dev site and created a simple custom form and built two similar workflows (less complex) and found that the same issue occurs.  So, I tried a couple of things. One thing I did try that seems to work on the dev site is to place a 1 minute pause after the item is created, then preform the updates to the new request. When i did this it appears that the on the change the workflow then kicks off. But the problem is have is that my 1 minute pause consistently takes 3 minutes (not sure why).

    I am very new to sharepoint, I am not a developer nor an administrator so if you do have a comment, please keep it simple.:)

    Existing SharePoint environment
    MOSS 2007    (Currently running SP2 Cumulative Update April 2011 - Standard Edition)

    Thursday, March 8, 2012 4:49 PM
  • I am suffering from the same problem with Sharepoint 2010.

    All the proper documents were read. I have 15 years experience as a C/C++ driver engineer as well as Java and C#. While new-ish to Sharepoint, I have many years of experience exercising complex software designs.

    Every thread I have read about this issue is followed by a response of "Did you verify that the 'Run on update' box is checked??". For the record, Yes I verified it a hundred times.

    All paths lead me to believe this is a defect with Sharepoint, and I would be interested in learning of a defect # with Microsoft so that I can track when it is resolved. Until then, I have resorted to excessive use of 1-minute timers within my workflows to continuously kickstart them, as the auto-start of workflows is not reliable. As a software engineer, I have certainly written my share of software defects, so my apologies if I sound too critical. These things happen.

    Its possible that something may be cached somewhere, such as an old workflow setting. Any advice on how to correct is welcome!

    Friday, March 16, 2012 3:54 AM
  • I had the same problem. But i was creating the new list item from with-in a 'Impersonation Step' once i changed to a normal 'Step' it solved my issues of the second workflow not starting. This fixes it as the new item is no longer being created by a system account.
    Friday, March 23, 2012 9:47 AM
  • Anyone have a solution for this problem with Sharepoint?

    I have been digging on the web for the longest time ever trying to find a solution for it... still no luck with it.

    Friday, July 13, 2012 1:49 AM
  • Can I suggest a slightly different appoach (not much)

    Rather than have the first workflow fire on Creat and Change just make it change.

    Create you item using Workflow 2 and as part of that workflow put in a wait for 5 mins then update one of the fields in the newly created items (simply change a Y/N  field)

    it may be that SP is not indexing the new  item therefore not attaching the first workflow there fore it is not firing.

    Kenny

    Tuesday, July 17, 2012 7:25 AM
  • You can Start Workflow by coding if you Insert Item using custom code.

    How to programmatically start sharepoint workflow

    http://jainnitin2411.wordpress.com/2012/07/06/programmaticallystartsharepointworkflow/public void StartWorkflow(SPListItem listItem, SPSite spSite, string wfName)
    {
      SPList parentList = listItem.ParentList;
      SPWorkflowAssociationCollection associationCollection = parentList.WorkflowAssociations;
      foreach (SPWorkflowAssociation association in associationCollection)
      {
        if (association.Name == wfName)
        {
           association.AutoStartChange = true;
           association.AutoStartCreate = false;
           association.AssociationData = string.Empty;
           spSite.WorkflowManager.StartWorkflow(listItem, association, association.AssociationData);
         }
       }
    }

    Follow the link if you get any error when run Workflow by custom coding

    http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomizationprevious/thread/fc4e1073-d67f-449a-b443-e5805f5358c7

    Thursday, January 24, 2013 10:45 AM
  • I am having the same issue though I am using a workflow to copy an item to another site. The intial workflow runs greta (impersonation or not) and copies the list item correctly. The second workflow - on the second list, never launches regardles if impersonation or not and regardless if on create or on change or both are checked. Of note is that regardless if the first workflow is impersonation step or not, the new file is always created by System Account. We need the ability to run against new items created by the account because it appears that the System Account as the creator cannot be overwritten.

    Please give us a switch on a library that allows that to happen so our workflows run. Or at least give us a definite answer.


    Greg McAllister

    Tuesday, February 19, 2013 3:43 PM
  • Hi - I originally added a comment back on February 19th 2013. I am amazed that there is still no answer from Microsoft regarding this issue. I thought the forums were monitored. My problem continues, and the fact that creating or copying an item to a list, the same or some other list, by workflow, prevents any other workflows from running, that are designed to run when a new item is added to a list, to be a major problem. Everybody has the same opinion that it fails unless we jockey user/impersonation or go write some code, and yet as a consultant I have attempted to do this on many systems and it has never worked and there is no reason why it shouldn't. As I stated in my previous post, a definitive answer would be of help because if it is not expected to work, then we, as consultants and develpers, can quite trying to do the impossible. But if it is a bug, and it has been around for the last several years, why has there not been a fix for it (as it did not work in 2007 either). And there is still no answer. Please, could someone fess up to the issue and let us poor folk know whats going on here?

    Greg McAllister


    Friday, June 14, 2013 7:55 PM
  • Same problem here in 2010 workflow. I have a workflow set to fire upon item change, and if the workflow itself does the item change, the workflow does not fire. An answer or update would be appreciated.

    Shae

    Friday, June 28, 2013 12:34 PM
  • Hi - I originally added a comment back on February 19th 2013. I am amazed that there is still no answer from Microsoft regarding this issue. I thought the forums were monitored. My problem continues, and the fact that creating or copying an item to a list, the same or some other list, by workflow, prevents any other workflows from running, that are designed to run when a new item is added to a list, to be a major problem. Everybody has the same opinion that it fails unless we jockey user/impersonation or go write some code, and yet as a consultant I have attempted to do this on many systems and it has never worked and there is no reason why it shouldn't. As I stated in my previous post, a definitive answer would be of help because if it is not expected to work, then we, as consultants and develpers, can quite trying to do the impossible. But if it is a bug, and it has been around for the last several years, why has there not been a fix for it (as it did not work in 2007 either). And there is still no answer. Please, could someone fess up to the issue and let us poor folk know whats going on here?

    Greg McAllister


    Have the same problem.  I work on an O365 account and have taken to raising service calls with Microsoft when having issues with SPD workflows.  Whilst I rarely get a positive/helpful response, it does seem to elicit the company line of "we don't support custom workflows".  I have told them that this I can understand, but when I highlight that I feel there is a feature in their product that just plain "does not work" as what (scant) documentation suggests it should, it falls on deaf ears.

    If I make any headway - no one hold their breath - I'll update this post...

    19th July 2013...

    Have received an initial response from my Service Request to MS who advise me to create a 2010 WF against my 2013 SP site.  I have rejected this on the grounds of preferring to work with a solution that does not rely on a legacy WF platform which Microsoft could choose to retire at a time of their choosing and over which I have no control as I am using their cloud offering.  Too pedantic?

    • Edited by SJM_Nelson Thursday, July 18, 2013 10:07 PM status update
    Tuesday, July 16, 2013 9:59 AM
  • I have same trouble.  O365  E1 plan.

    Workflow from list A  create item in list B

    In list B workflow doesn't automatically start.  But if I create item in list B manual, workflow started without problem.

    More details here: https://skydrive.live.com/redir?page=view&resid=3A4056CB00DCCF16!1338&authkey=!AP5JIfQRMnw5ixI
    • Edited by varvar_p Thursday, July 18, 2013 2:01 AM add link to more details
    Thursday, July 18, 2013 1:31 AM
  • I had an issue with the workflow not starting automatically.  The fix was to insert an event to log to history before any relevant actions were taken.  I set it to log "Start workflow" as the first action and it works great now.
    Wednesday, April 30, 2014 7:14 PM
  • I had the same issue with 2013 SharePoint Online lists and 2013 SPD workflows. I used a 2013 workflow to create 4 items in a second list using the parallel block in 2013. I wanted a workflow in the second list to run when the items were created, but it would not start unless I manually started each workflow.

    I used a 2010 Workflow for the second list workflow and it works fine. I would rather use 2013 but I need to get this done so I will go with the 2010 and hope that Microsoft provides some upgrade path when they upgrade from 2013. There are some good things in SPD 2013 workflows and quite a few that make no sense at all. That this has been an issue this long with no answer is not encouraging. Hope this helps someone, best off luck

    IbisDev


    IbisDev

    Wednesday, September 10, 2014 9:31 PM
  • I also out of the blue started having this issue.  As stated by Teacherman04, "Log <this messge> to the workflow history list" as the first item fixed it for me.  Probably a good best practice to log a start message anyway.
    Wednesday, September 17, 2014 5:59 PM
  • Also be cogniscant of using 'Set' versus 'Update' actions. Set will not trigger the Change event, whereas Update will.
    Thursday, January 22, 2015 5:13 PM
  • I'm using Sharepoint Designer 2010, and here's what worked for me:

    1. Have workflow1 create an item in workflow2's list, starting the workflow
    2. Pause 1 minute
    3. Have workflow 1 update the item that was just created (I changed the title)

    What did not work for me:

    • Putting logs anywhere in the workflow (start or end)
    • Running either workflow in an "Impersonation Step"

    I hope that helps someone else!




    • Proposed as answer by BradleyRR Friday, July 8, 2016 7:10 PM
    • Edited by BradleyRR Friday, July 8, 2016 7:12 PM
    Friday, July 8, 2016 7:08 PM
  • Has anyone ever determined a solution for this.  None of the approaches I have found works on Office 365.  I have tried every single one.  2 days of attempts so far.  Nothing I have done has gotten a new or change event to fire when the item is created or changed by another workflow.
    Monday, July 18, 2016 10:25 PM
  • I created a field in my list item called [Worflow Started] that is a yes/no type and set the default value to false. I then set the workflow to start on new item created or when it is changed.

    Since I only want the workflow to run once on the list item, I did a check on the [Workflow Started] field to make sure it was equal to no. I then set the workflow variable [Started?] to equal the form field [Workflow Started].

    If [Started?]=No I transition to the first stage in my workflow. If [Started?]=Yes, I end the workflow. In the first step after this check, I set the [Workflow Started] field to Yes. It's not the most elegant solution, but it works.

    Wednesday, October 5, 2016 6:14 PM
  • Almost 7 years and still no fix from Microsoft? This seems to me to be a bug that should be easily remedied. Hope they take care of this soon as the workarounds are clumsy at best
    • Proposed as answer by s4developer Saturday, December 24, 2016 9:16 PM
    • Unproposed as answer by s4developer Saturday, December 24, 2016 9:17 PM
    Sunday, October 23, 2016 2:52 PM
  • There's a great blog to checkout that'll help you start the workflow. 

    Part 2 mostly will help you find the api call to start a workflow by subscriptionID

    https://blogs.msdn.microsoft.com/sridhara/2014/08/21/fix-sharepoint-2013-workflow-recursion-prevention-part-2/

    Help this helps! 

    Saturday, December 24, 2016 9:18 PM
  • This worked for me!  Thanks for the advise.  Hate going code if we don't need to.  

    I began this adventure when attempting to create a new calendar list item in list 2 from a workflow started in list 1.  List 2 contained a multi-value lookup field which in itself causes a whole 'nother slew of issues.  Here's how i did it.

    LIST SETUP - LIST 1 __

    • Contains the same multi-value lookup field that list 2 has

    WORKFLOW SETUP - LIST 1 __

    • Set to start upon item creation
    • Set string variable to store delimited ID values from multi-value field (Drew was a huge help with this... http://concurrency.com/blog/w/setting-a-multi-value-lookup-column-using-sharepoi)
    • Create item in list 2 and send delimited ID var to a column in list 2 configured as string data type... i called this eventDelim (you cannot send this var directly to the multi-value column or you will receive JSON errors);  also send ID of current item in list 1 to column in list 2 configured as string data type (I called this eventID)
    • Pause workflow for 1 min
    • Update item in list 2 and set WfStart field to Yes where eventID in list 2 equals current item ID

    LIST SETUP - LIST 2 __

    • multi-value lookup field (same as list 1)
    • eventID column (stores ID of current item from list 1 workflow)
    • mediaDelim column (delimited ID values from list 1 multi-value field... ex. 1;#;#2;#;#)
    • wfStart column (default is No; this is used so list 1 workflow can notify list 2 workflow when to run)

    WORKFLOW SETUP - LIST 2 __

    • Set to start upon list item change
    • If statement to determine when wfStart is changed
    • If statement to determine if multi-value field is empty or not (will always be empty upon item creation but good to check)
    • Update list item action that updates list 2 current item multi-value field to value in eventDelim field

    BOOM!  MS definitely does not make this easy.




    • Edited by sneekypete Friday, March 31, 2017 4:47 PM
    Friday, March 31, 2017 3:26 PM
  • Hi,

    I had the same issue and solved by creating a SPD 2010 workflow.

    Regards.


    Thursday, April 6, 2017 7:09 PM
  • Please select SharePoint 2010 workflow instead of using SharePoint 2013
    Thursday, January 4, 2018 7:30 AM
  • Can't believe this, this issue was raised back in 2010 and we are in 2018! and still no solution except to create 2010 wf? 

    IN
    Thanks, Kashif


    • Edited by Kashif Nizam Wednesday, January 24, 2018 5:55 AM
    Wednesday, January 24, 2018 5:55 AM
  • This seems the only viable solution, to write the new item and then call a rest service to start the workflow. Thanks S4developer!

    • Edited by raen1978 Monday, March 5, 2018 3:39 PM
    Monday, March 5, 2018 3:36 PM