Friday 10 September 2010

How To... Create and debug a state machine workflow in SharePoint 2010 using Visual Studio 2010 and c# Part 4



Part 4 – Test driving the workflow.

This is Part 4 of 4 for creating a state machine workflow using SharePoint 2010 with Visual Studio 2010 and c#. To read the introductions please click here.
To read part 3 click here






  • From Visual Studio 2010 press the F5 button, this will build, deploy and activate your solution and should present a browser window pointing to our Document library.





  • Add a new document by clicking the add document link.


  • Browse for a valid document and click ok to add the document.


  • The document should appear in the library





  • Click the tasks link in the left nav – this will display all tasks.
    You should notice a task assigned to your dev user :





    Note : if no user name appears in the assigned to box – it could be that you have not assigned them access to your site, so you will need to assign permissions for the user and add a new document to repeat this test.



  • Select the task and edit the task.





  • Assign 100% complete then save
    You will now notice a new task in the task list assigned to our test user







  • Edit the Testers task.


  • Set the completion to 100%


  • Put the word rejected into the description – this should create another task for our developer to re-review.






  • Save the task

    Notice another task has appeared in the task list assigned to our dev user






  • Now complete this task


  • Then complete the new tester task without putting the word rejected in the description.

    Note that all tasks are showing as 100% complete






  • Now review the document in the devjobs document library




    THE END (at last! – Next time I may put something like this into a video!).

2 comments:

  1. Hi Paul,

    Nobody will explain in these simple steps. You are genious. Very thankfull to you.

    Regards
    Anand

    ReplyDelete
  2. Hi Paul,

    Its very good post..You have explained each and every step very clear.
    Many Many Thanks for your hardwork.

    Could you please send me the link for Sequential Workflow steps, if you have any.

    Thanks,
    Ganga

    ReplyDelete