- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
Primary Objects in Microsoft Word
Primary Objects Drawing DataMatrix In None Using Barcode creation for Word Control to generate, create Data Matrix 2d barcode image in Office Word applications. www.OnBarcode.comANSI/AIM Code 39 Generation In None Using Barcode maker for Office Word Control to generate, create USS Code 39 image in Word applications. www.OnBarcode.comEverything begins with the Microsoft.Sharepoint.Workflow namespace. This is the primary namespace containing all of our objects and is part of Microsoft.Sharepoint.dll. I m not going to pad out the book by listing each and every object, interface, and enumeration in the namespace and then each and every property and method within each object. I ll just cover the main ones that you are more likely to use. If you need information on one of the remaining elements, you can fire up the Object Browser in Visual Studio or peruse the SDK. Encode PDF-417 2d Barcode In None Using Barcode creator for Word Control to generate, create PDF-417 2d barcode image in Word applications. www.OnBarcode.comBarcode Creation In None Using Barcode maker for Word Control to generate, create Barcode image in Office Word applications. www.OnBarcode.comCHAPTER 10 THE WORKFLOW OBJECT MODEL
QR-Code Drawer In None Using Barcode printer for Word Control to generate, create QR Code 2d barcode image in Office Word applications. www.OnBarcode.comGTIN - 128 Encoder In None Using Barcode drawer for Office Word Control to generate, create EAN 128 image in Office Word applications. www.OnBarcode.com Note I likely can t say this enough: this chapter does not contain every member of every class. I cover the Universal Product Code Version A Printer In None Using Barcode maker for Microsoft Word Control to generate, create Universal Product Code version A image in Office Word applications. www.OnBarcode.comRoyalMail4SCC Creator In None Using Barcode creation for Microsoft Word Control to generate, create RoyalMail4SCC image in Office Word applications. www.OnBarcode.comhighlights the stuff you are more likely to use. For a deep-dive into all methods, properties, enumerations, and so forth for each and every class, see the SDK reference material. Print Data Matrix In .NET Using Barcode maker for .NET Control to generate, create DataMatrix image in Visual Studio .NET applications. www.OnBarcode.comECC200 Printer In Objective-C Using Barcode generator for iPhone Control to generate, create Data Matrix image in iPhone applications. www.OnBarcode.comSPWorkflow
USS Code 39 Reader In .NET Using Barcode scanner for .NET framework Control to read, scan read, scan image in Visual Studio .NET applications. www.OnBarcode.comCreating Code 3/9 In Java Using Barcode drawer for BIRT reports Control to generate, create Code 39 Extended image in BIRT applications. www.OnBarcode.comThis class represents a workflow instance. It could be an instance that is currently running or one that completed running (either successfully or resulting in some type of error). The properties and methods of the class give you access to information about the instance as well as the ability to manipulate the instance. Table 10-1 lists the important properties of this class. Barcode Maker In .NET Framework Using Barcode maker for ASP.NET Control to generate, create Barcode image in ASP.NET applications. www.OnBarcode.comDrawing Barcode In .NET Framework Using Barcode printer for Reporting Service Control to generate, create Barcode image in Reporting Service applications. www.OnBarcode.comTable 10-1. Properties of the SPWorkflow Class
Reading DataMatrix In Visual C#.NET Using Barcode scanner for Visual Studio .NET Control to read, scan read, scan image in Visual Studio .NET applications. www.OnBarcode.comGTIN - 12 Decoder In Java Using Barcode decoder for Java Control to read, scan read, scan image in Java applications. www.OnBarcode.comProperty
Generate QR In Objective-C Using Barcode encoder for iPad Control to generate, create QR Code image in iPad applications. www.OnBarcode.comCreating Code 39 In .NET Framework Using Barcode creator for Reporting Service Control to generate, create Code 3/9 image in Reporting Service applications. www.OnBarcode.comHistoryList
Recognizing Data Matrix In .NET Using Barcode reader for .NET Control to read, scan read, scan image in .NET framework applications. www.OnBarcode.comGenerating UCC - 12 In C#.NET Using Barcode creator for .NET Control to generate, create UCC.EAN - 128 image in .NET applications. www.OnBarcode.comData Type
SPList
Description
Read-only. Returns the SPList object that contains the history entries for this workflow instance. There is also a similar HistoryListId property that returns the GUID for the history list that is also read-only. Read-only. Returns the unique identifier for this workflow instance. Read-only. Returns the current state of the workflow instance. See the SPWorkflowState object for details on this enumeration. Read-only. Returns an indicator as to whether the workflow instance has finished processing. You could also get this information from the InternalState property, although this property returns true for any InternalState value that indicates the workflow is no longer running, i.e., Cancelled, Completed, Expired, FatalError, Orphaned, or Terminated. Read-only. Returns an indicator as to whether this workflow instance is locked. You could also get this information by interrogating the InternalState property and looking for a value of SPWorkflowState.Locked. Read-only. Returns the unique identifier for the SPListitem or SPWeb to which this instance is attached. InstanceId InternalState
GUID SPWorkflowState
IsCompleted
bool
IsLocked
bool
ItemGuid
GUID
CHAPTER 10 THE WORKFLOW OBJECT MODEL
Table 10-1. Properties of the SPWorkflow Class
Property
ListId
Data Type
GUID
Description
Read-only. Returns the unique identifier for the SPList to which this instance is attached. Read-only. Holds a reference to the SPWorkflow association object for this instance. Provides access to all of the information related to the association between this workflow and its parent list. Read-only. Returns an SPListItem object that is the item that this instance of the workflow is attached to. Read-only. Returns an SPList object that is the list this workflow instance is associated with. Read-only. Returns an SPWeb object that is the SPWeb that this workflow instance is executing within. Read-only. Returns a unique identifier for the site collection that this workflow instance is executing within. Read-only. Returns the SPList object that contains the task entries for this workflow instance. There is also a similar TaskListId property that returns the GUID for the task list that is also read-only. Read-only. Returns an object that contains the collection of tasks associated with this workflow instance. Read-only. Returns a unique identifier for the web that this workflow instance is executing within. ParentAssociation
SPWorkflowAssociation
ParentItem
SPListItem
ParentList
SPList
ParentWeb
SPWeb
SiteId
GUID
TaskList
SPList
Tasks
SPWorkflowTaskCollection
WebId
GUID
There are also a few methods, but only one that you will likely use from the SPWorkflow class. It is described in Table 10-2. Table 10-2. The Useful Method from the SPWorkflow Class
Method Name
CreateHistoryEvent
Description
Allows you to programmatically write entries to the history list for this instance. You can specify an event ID, the history outcome, a description, and various other elements in the parameters. CHAPTER 10 THE WORKFLOW OBJECT MODEL
Sample Code
To see this object in action, take a look at Listing 10-1. It contains code that could be placed inside a workflow to log some pertinent details about the workflow to its own history list. Listing 10-1. Working with SPWorkflow Properties in C# //"workflowProperties" is an object of type SPWorkflowActivationProperties SPWorkflow spw = new SPWorkflow(workflowProperties.Item, workflowProperties.WorkflowId); StringBuilder sbLogInfo = new StringBuilder(); sbLogInfo.AppendFormat("Date Created: {0}", spw.Created.ToLongDateString()); sbLogInfo.AppendFormat("Instance ID: {0}", spw.InstanceId.ToString()); sbLogInfo.AppendFormat("Payload Item ID: {0}", spw.ItemGuid.ToString()); sbLogInfo.AppendFormat("List ID: {0}", spw.ListId.ToString()); sbLogInfo.AppendFormat("Web ID: {0}", spw.WebId); spw.CreateHistoryEvent(0, null,workflowProperties.OriginatorUser, "Workflow Information", sbLogInfo.ToString(), string.Empty);
|
|