SharePoint Products TechCenter > SharePoint Products and Technologies Forums > SharePoint - Workflow > Workflow doesn't finish when asked to wait for a value to change without being prompted.
Ask a questionAsk a question
 

AnswerWorkflow doesn't finish when asked to wait for a value to change without being prompted.

  • Monday, November 02, 2009 10:52 PMZiriax Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have a workflow that is set to wait for a field change, but when that field has made it's change the afore mentioned workflow doesn't complete without being prompted (opening the edit properties menu of the document), how can I make it recognize the change it is waiting for and finish automatically?

Answers

  • Tuesday, November 03, 2009 7:23 PMClayton Cobb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    It can take up to 5 minutes for the Timer Service to run, which is what picks up workflows like that, but no more than 5 minutes.

    What do you mean it only completes if you change the doc in some way?  Isn't the doc property changing when the workflow status changes?  What is actually triggering this status change?
    SharePoint Architect || My Blog
    • Marked As Answer byZiriax Tuesday, November 03, 2009 7:43 PM
    •  

All Replies

  • Tuesday, November 03, 2009 12:53 AMChris Caravajal Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    What is the change that the workflow is waiting for?

    What type of column and information is being collected?

    Is this update being manually entered by a user or is another business process, custom solution, or workflow updating the field?
    Chris Caravajal MCTS SharePoint Help
  • Tuesday, November 03, 2009 1:53 PMZiriax Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    It is waiting for an approval workflow to finish and populate it's column with either approve or reject.
  • Tuesday, November 03, 2009 5:19 PMClayton Cobb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    It is waiting for an approval workflow to finish and populate it's column with either approve or reject.

    What values are you trying to compare?  If you are trying to compare against a status column for a workflow, then the underlying values are not simply "Approved," but rather "1;Approved" or something like that.  You need to determine the exact underlying values of those statuses and then adjust your comparison statement accordingly.

    One way to quickly check the exact syntax is to use an Action for Log to History List and simply log the value of the workflow status column to the history list, go view the history list, and utilize the exact text.
    SharePoint Architect || My Blog
  • Tuesday, November 03, 2009 5:24 PMZiriax Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I have found the actual value and am using it as my identifier, 16 for Approved and 17 for Rejected.

  • Tuesday, November 03, 2009 5:28 PMClayton Cobb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Does that mean you just found it, or you already were using those values?
    SharePoint Architect || My Blog
  • Tuesday, November 03, 2009 6:05 PMZiriax Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have been using these values.
  • Tuesday, November 03, 2009 6:53 PMClayton Cobb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ok, then I'll start over.

    So, your SPD workflow says, "Wait for change in current item," and it's waiting for the workflow column to say "Approved" or "Rejected" but is actually comparing the true underlying values instead of the words.  Upon the workflow status changing to one of these values, your workflow is not moving and remains In Progress?  Nothing happens at all?  This method does work, so it would only not fire if the condition wasn't met.
    SharePoint Architect || My Blog
  • Tuesday, November 03, 2009 7:10 PMZiriax Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You are correct, it stays In Progress even after the condition is met.  The only time it completes is if I change the document in some way, or could it be that I'm not waiting long enough for it to recognize the change?  It should be instantaneous shouldn't it?
  • Tuesday, November 03, 2009 7:23 PMClayton Cobb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    It can take up to 5 minutes for the Timer Service to run, which is what picks up workflows like that, but no more than 5 minutes.

    What do you mean it only completes if you change the doc in some way?  Isn't the doc property changing when the workflow status changes?  What is actually triggering this status change?
    SharePoint Architect || My Blog
    • Marked As Answer byZiriax Tuesday, November 03, 2009 7:43 PM
    •  
  • Tuesday, November 03, 2009 7:43 PMZiriax Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thank you!  You solved my problem, I'm impatient.  I appreciate your time.

  • Tuesday, November 03, 2009 7:56 PMClayton Cobb Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ah, good.  =)
    SharePoint Architect || My Blog