13.07.2015 Views

Microsoft SharePoint. Building Office 2007 Solutions in VB 2005 ...

Microsoft SharePoint. Building Office 2007 Solutions in VB 2005 ...

Microsoft SharePoint. Building Office 2007 Solutions in VB 2005 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 7 ■ SHAREPOINT CUSTOM FEATURES AND WORKFLOWS 265Members are either variables or property code structures that ma<strong>in</strong>ta<strong>in</strong> the state of theworkflow. For example, if you are assign<strong>in</strong>g a new task <strong>in</strong> a workflow, the CreateTask activityshown <strong>in</strong> Figure 7-8 will require you to def<strong>in</strong>e a member for track<strong>in</strong>g the unique identifier ofthe created task. You may also have members to track the values of the fields associated withthe tasks. The workflow designer provides an <strong>in</strong>terface for def<strong>in</strong><strong>in</strong>g and track<strong>in</strong>g members andwill automatically generate the required code <strong>in</strong> your project. You’ll get a chance to use these<strong>in</strong>terfaces <strong>in</strong> the exercise at the end of the chapter.Once you have configured the activities, you can write code to run when each step of theprocess is executed. Each activity has methods associated with it that can be automaticallygenerated <strong>in</strong> your project. In the designer, you can right-click any control and select GenerateHandlers from the context menu. This will stub out the available methods for the activities <strong>in</strong>your code.Creat<strong>in</strong>g InfoPath FormsAlong with creat<strong>in</strong>g the workflow, you must also create a series of InfoPath forms or ASPX files<strong>in</strong> order to use the workflow <strong>in</strong> <strong>SharePo<strong>in</strong>t</strong>. The forms or pages are used to provide an <strong>in</strong>terfaceto <strong>in</strong>itiate a workflow or complete an assigned task. In this chapter, you’ll make use of InfoPathforms for this purpose. These InfoPath forms must be fully trusted, compliant with InfoPathForms Services, and conta<strong>in</strong> fields for use <strong>in</strong>side of the workflow you create <strong>in</strong> Visual Studio.You have already seen examples of these forms when you used the built-<strong>in</strong> MOSS workflows.Figure 7-9 shows an example of such a form seen when the Approval workflow is started.Figure 7-9. InfoPath forms are used to gather workflow data.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!