1

I'm currently working on a Purchase Order workflow in Sharepoint, and have set this up to, on item creation, automatically run the workflow. I'm creating the workflow in SPD, and this is the key part of it:

Set content approval status to Pending with Awaiting approval from [%Parameter:MainApprover%]
then Assign Approve New PO (Tier 1) to Parameter: MainApprover
then Wait for Approval Status to equal 0;#Approved
then Update item in current item

As you can see, it sets the approval status to pending, then creates a task for the designated approver to approve it. I'm expecting the approver to then use the built in 'Approve/Reject' menu button to give their word. When they do this, it does indeed update the status to approved, but the 'Wait for...' bit onwards never activates.

I checked up on the task that's assigned to them and it's status is 'Not Started' - if the approver does then go into the task they can click 'completed' and suddenly all works perfectly.

My question therefore is: how do I automate the completion of the task when the approver changes the 'Approval Status' field?

Help much appreciated.

0

As far as I know, in both SharePoint Designer and Visual studio workflows, assigning a new task will pause execution of the workflow until it is complete. In visual studio workflows however, there is this useful option:

enter image description here

If it is set to false, the workflow will continue execution without waiting for the user to accept it. If the SharePoint designer activity does not provide this option, you can always create a custom (declarative) visual studio workflow activity that exposes that parameter.

  • Thanks for this @david - seems like the right option but not available in SPD. What would the best way be to resolve this in Visual Studio? I don't think I can open my existing workflow in VS? – Henry Cole Oct 16 '13 at 11:21
  • @HenryCole No need to open your existing workflow in VS. Create a "Custom Activity" with VS that accepts the parameters you need as input arguments (including WaitForTaskCompletion), and then deploy it. You will be able to use that activity in SharePoint Designer. You can find more info on custom activities on MSDN if you're not yet familiar with them :) msdn.microsoft.com/en-us/library/jj163867.aspx – David Oct 16 '13 at 13:26
  • @HenryCole Please accept the answer if it is helpful or comment if you need further clarification. Thanks – David Oct 29 '13 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.