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

I have a sequential workflow with an OnWorkflowActivated and three Create Tasks which are inside of a Sequence. Currently, after the OnWorkFlowActivated is called and done executing the code, it will call the first of the three Create Tasks. However, once the first task is done executing all the code, it won't call the next two tasks. The only way one task can call the next task is by calling the actual method name, e.g.

uploadToFTPTask_MethodInvoking(sender, e);

I would like the workflow to automatically (without user input) go to the next task as long as all the code in the previous task has completed successfully. And if the code has not completed, have the workflow report that the workflow did not complete. This workflow is inside Visual Studio and not SharePoint designer.

share|improve this question
    
Anyone have tips on how I could add more detail or information to this question? I have three tasks and when one is completed, it will not go to the next task without calling the method name. I would like it to go to that task if the previous task's code executed successfully. –  Meyer Denney Jun 23 '11 at 18:06
add comment

1 Answer 1

up vote 0 down vote accepted

I needed have a unique correlation token for each task as well as populate the task GUID at runtime and associate the ListItemID at runtime. The code inside the task method looks like this:

        UploadToFTPTask_TaskId1 = Guid.NewGuid();
        UploadToFTPTask_ListItemId1 = workflowProperties.ItemId;

With that code, I didn't need to call on the next task with its method name, the workflow automatically went to the next task as long as it had a unique TaskID and a ListItemID.

share|improve this answer
add 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.