Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Even though I have both:

                sequentialWfWorkflowAssociation.AutoStartCreate = true;
                sequentialWfWorkflowAssociation.AutoStartChange = true;       

the workflow only gets activated one every time an item is created or changed. If I make a second change to the item and click update, the sequential workflow won't get activated. If I set the item's task to complete for more than one task, the sequential workflow won't get activated the second time.

Note: there are two workflows attached to this document library. The first one, which I did not create, works fine, the second one which I did create, the sequential workflow, will only get activated one time per item creation or update. Any tips?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Only a single instance of a specific workflow association can be active on an item at any one time - this is by design. For example, you can associate the out-of-box approval workflow to the same document library twice with different association names, and they can both run at the same time, but as long as one is running, the same association cannot run twice.

You could consider associating the same workflow twice, once to start on new, and once to start on change, although this is a bit of a dangerous design.

share|improve this answer
    
Well these two workflows are different. Can two different workflow instances be associated to an active item at the same time? –  Meyer Denney Jun 23 '11 at 19:14
    
I guess I don't understand based on your explanation. My assumption is that the same workflow is still running (based on start on new item), and won't run again on change because the workflow is already running. –  Chris Beckett Jun 23 '11 at 22:00
    
Ah, I understand now. You are right, the workflow gets started once and another instance of it can't start until it has completed. If that instance were to return Completed or Failed, would it be able to restart on that item again? –  Meyer Denney Jun 23 '11 at 22:54
    
Yes, once the current instance completes, it can be run again at that point triggered either by a chaqnge, or started manually. –  Chris Beckett Jun 24 '11 at 14:49
    
If you create a reusable workflow (either in VS2010 or as a reusable workflow in SPD2010), you can associate it twice with different names. Configure one to run on start, and another to run on change. As noted however, this can be a dangerous design depending on what your are doing in the workflow. –  Chris Beckett Jun 24 '11 at 14:51
show 1 more comment

Your Answer

 
discard

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.