One of my customer would like to call “onWorkflowItemChanged” multiple times until the he got a specific value in a list item column. I have prepared the following solution to resolve the problem :-
Code Sample ===========
Code Sample
===========
1: private void checkStatus(object sender, ConditionalEventArgs e)
2: {
3: SPListItem item = workflowProperties.Item;
4: if (item["Status"].ToString().ToUpper() == "PENDING APPROVAL")
5: {
6: e.Result = true;
7: }
8: else
9: {
10: e.Result = false;
11: }
12: }