locked
Workflow won't stop when "Stop Workflow" action is used RRS feed

  • Question

  • I can't stop my workflow from going to approver 2 even when approver 1 rejects.

    My situation can be very generic and could apply to any simple workflow.

    Environment:
    SharePoint 2010 Enterprise / InfoPath 2010 / SPD Custom No Code Workflow

    Here is a generic version of what I am doing:

    1 Start Approval Person 1 on Current Item with TestUser1
    2 If Current Item:Approval Status equals Rejected
    3 Email Current Item: CreatedBy
    4 Then Stop the workflow and log "Stop"
    5 Start Approval Person 2 on Current Item with TestUser2
    ....

    When I Reject at step 2 it should not assign the next approval "Stage 2 Approver" but that user gets a task assigned no matter what "Initial Approver" does, even if they reject.

    I have taken this out of my specific senario and just experiemented with a simple list approval.

    The bottom line is I can make the first step do anything I want. I tested it by taking off the "Stage 2 approver" step. So I just said start an approval upon form submission, if reject send email to ..... say it rejected, if approved send an email to ..... saying it is approved. In this very simple test and the WF behaviour sent the correct email depending on the "Approval Status" just as I would have expected.

    The hump I can't get over is that when the first Approval process is run, no matter what the outcome or status, and I do check these by doing a "If approval status = value".... , it just goes to the next step and assigns the next task. I can't get it to stop.

    Further informaion:

    I think I am getting confused because there are so many status indicators for the WF, for the content approval, for the task process, outcomes, etc.....

     

    Any help would be appreciated. I made this as generic as I could.

     

     

     

     


    • Edited by DanJBSTEAKS Monday, November 28, 2011 6:19 PM
    Monday, November 28, 2011 6:16 PM

Answers

All replies

  • Hi,

     

    First, you should post the question related to SharePoint 2010 to the dedicated forum, this forum is for pre-SharePoint 2010.

     

    For your question, you can refer to this thread and follow Emir Liu's steps.

     

    http://social.technet.microsoft.com/Forums/en-US/sharepoint2010customization/thread/80c087ca-2474-412b-9e7c-ec771d07e141

     

    And you can create the workflow logic in Visio and export it to SharePoint Designer, which will make the logic more transparent.

     

    Hope this helps.

     

    Thanks,

    Pengyu Zhao

    • Marked as answer by Pengyu Zhao Wednesday, December 7, 2011 2:30 AM
    Wednesday, November 30, 2011 2:50 AM
  • I am having much the same issue, and I really don't understand the solution given. My situation is as follows:

    Workflow is related to Document Library 1, and starts upon new item creation.

    User uploads a document to Document Library 1. Metadata fields "Name" and "Publish on Upload" are set by the user during the upload. The default value for "Process" is "Initial"). User clicks "Save", workflow starts.

    The following workflow is to upload a new document to two libraries upon initial upload. During the upload, the user has the option to enter a value in metadata field "Publish on Upload". If they set the value to "yes", the workflow should  copy the new document to Document Library 2, reset the "Publish on Upload" value to no, and Stop the workflow. Instead, it identifies "Publish on Upload"=yes, copies the document to Doc Library 2 and resets "Publish on Upload" to no. Then it skips the Stop workflow action, and continues on to Step 2, where it logs twice to workflow history and Stops the workflow successfully. This workflow has been working successfully, and now all the sudden, it is ignoring the first Stop Workflow. Can anyone offer any information on why this may be happening?


    Meaghan Baker

    Friday, October 13, 2017 1:00 PM