SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I have two workflows wf1 and wf2 on one list i've created in visual studio.

I need to check from within wf2 if wf1 is completed. (Usually I see not started, in progress and completed)

How can i do this programatically pls.


share|improve this question
Please, add information, what type of WF are you using? SP2010 or SP2013? As this workflow types and solutions for them are very different. – MikhailSP Apr 17 '13 at 7:26
Ooops, I have just realized that this question was asked more than a year ago, but why it was shown to me as new? :). Sorry. Now it is obvious that it was a 2010 WF. – MikhailSP Apr 17 '13 at 7:27

As a possible workaround which could work for both types of WF (SP2010 ans 2013), you can create a field which is keeping WF1 status.

For instance, right after start WF1 sets value of the field to "Started", right before completing: "Completed". In such a case you can check value of this field in WF2.

However, in this approach you could not handle situations when WF is canceled by user, but probably it is not necessary in your case.

share|improve this answer

According to this very thorough MSDN article:

, you could do this by retrieving a list of running workflows from the appropriate list item (SPListItem.Workflows property), search this list for wf1 instance, and then use SPWorkflow.IsCompleted property to check if the wf1 is completed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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