The following article explains the use of the XML Field created by the SharePoint Process Wizard.

The purpose of this article is to explain the usage of the various K2.net XML Fields utilized by K2.net to integrate with SharePoint Portal Server 2003.
  • K2.net 2003 makes use of the following fields
  • AttachedDocuments
  • EventDetails
 
AttachedDocuments
The "AttachedDocuments" field is a Process XML Field. This field is created by the SPS wizard and populated with data based on the details entered by the user during the configuration steps. The K2.net Document Attachment Control (SmartForm Control) uses this field as the source for all the documents that are part of a process instance. The control has the ability to work with single or multiple documents. The "AttachedDocuments" field is updated by the control to ensure that the correct location of all documents is saved each time a user makes changes to any document or attaches new documents.

  
 Field Description
serverThe server element contains the actual URL that points to the SharePoint server e.g. http://MySPSServer:8181
siteThe site element contains the information related to the site where the document is located e.g. /sites/MySiteName
workspaceNot Used. The workspace element is only included for backwards compatibility with previous versions of K2.net 2003.
folderThe folder element contains the name of the actual document library (include subfolders) e.g. Shared Documents
docnameThe docname element contains the document name including a valid file extension e.g. MyDocument.doc
filefullurlThe filefullurl element contains the path (URL encoded) relative to the location of the document within SharePoint
e.g. http://MySPSServer:8181/sites/MySiteName/Shared%20Documents/MyDocument.doc
idThe document node is the repeating node of the field. The repeating node contains all the details to each attached document that is part of the Process Instance. Each document stored has a unique ID. In a scenario where an action on a document library starts the Process Instance only one document will be listed in this field. The Document attachment control may add more documents to the field later on in the Process Instance.
procinstidNot Used. The workspace element is only included for backwards compatibility with previous versions of K2.net 2003.
documentidNot Used. The workspace element is only included for backwards compatibility with previous versions of K2.net 2003.
EventDetail
 
The "EventDetail" field is a Process XML Field which is created by the SPS wizard and populated during the creation of the Process Instance. Population of the field is based on the action that raised the event in SharePoint. The EventData section stored in the field is based on the public members available on the Microsoft.SharePoint.SPListEvent and Microsoft.SharePoint.SPFile object.

  
 Field Description
EventTypeThe action that raised the event e.g. CheckIn, CheckOut
ServerUrlStores the relative URL (SPFile.ServerRelativeUrl) of the file based on the URL for the server e.g. http://vm2003:81
SiteFullUrlStores the URL (SPFile.ParentFolder.ParentWeb.Url) of the parent folder of the file e.g. http://vm2003:81/sites/Contoso
SiteRelativeUrlStores the ServerRelativeUrl (SPFile.ParentFolder.ParentWeb.ServerRelativeUrl) of the parent folder of the file e.g. /sites/Contoso
DocumentLibraryStores the Document Library name (SPFile.ParentFolder.Url) containing the document e.g. Shared Documents
DocumentLibraryRelativeUrlStores the relative URL (SPFile.ParentFolder.ServerRelativeUrl) of the Document Library e.g. /sites/Contoso/Shared Documents
DocumentLibraryFullUrlStores the full URL (SPFile.ParentFolder.ParentWeb.Site.MakeFullUrl(File.ParentFolder.ServerRelativeUrl) of the Document Library e.g. http://vm2003:81/sites/Contoso/Shared%20Documents
FileNameStores the document file name (SPFile.Name) including the file extension e.g. MyDocument.doc
FileRelativeUrlStores the relative URL (SPFile.ServerRelativeUrl) of the document e.g. /sites/Contoso/Shared Documents/MyDocument.doc
FileFullUrlStores the full URL (SPFile.ParentFolder.ParentWeb.Site.MakeFullUrl(File.ServerRelativeUrl)) of the document e.g. http://vm2003:81/sites/Contoso/Shared%20Documents/ MyDocument.doc
Fields

Stores collection Field nodes. Each Title attribute holds the title of the meta data column and the inner text of the value. Please note that the collection is based on the Metadata columns selected during the configuration of the wizard.

<Field Title="ID">1</Field>
<Field Title="Created By">K2DEMO\administrator</Field>