K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
Content Field

K2 Concepts - What is a K2 Content Field? 

A K2 Content Field is an XML field, with an associated schema that functions as a place holder for storing and manipulating data. The Content Field itself represents where a designated item can be located in SharePoint, for example a document library. At runtime the Content Field's metadata can be viewed and will provide the values associated with the field for example a URL pointing to a form within a SharePoint forms library.

A Content Field consists of a:

Content Fields are schema dependent

Where do you find the K2 Content Field? 

The Content Field is located in the  Process > Activity Data tab in the Object Browser. Where multiple items need to be represented, a repeating node is used. Shown in figure 3 below, the image describes how each document stored in the content field will be represented in the repeating nodes of the XML.

How do you create a K2 Content Field?

There are two methods to create a Content Field:

Event wizards:

Process Wizards:

After configuring the SharePoint Workflow Integration and the SharePoint Events Process Wizards, Content Fields are automatically created. These Content Fields are displayed in the Process > Activity Data section of the Object Browser.

Fig.3. Example of a Content Field created by the SharePoint Workflow Integration Wizard

The option to map meta data is available by right-clicking the node and selecting Add

Copy

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

      <xs:element name="Items">

            <xs:complexType>

                  <xs:sequence>

                        <xs:element name="Item" maxOccurs="unbounded">

                              <xs:complexType>

                                    <xs:sequence>

                                          <xs:element name="SiteURL" />

                                          <xs:element name="ListURL" />

                                          <xs:element name="FolderURL" />

                                          <xs:element name="Item" />

                                          <xs:element name="URL" />

                                          <xs:element name="Source">

                                                <xs:complexType>

                                                      <xs:sequence>

                                                            <xs:element name="SiteURL" />

                                                            <xs:element name="Library" />

                                                            <xs:element name="Folder" />

                                                            <xs:element name="Name" />

                                                            <xs:element name="URL" />

                                                      </xs:sequence>

                                                </xs:complexType>

                                          </xs:element>

                                    </xs:sequence>

                                    <xs:attribute name="ID" type="xs:string" use="required" />

                              </xs:complexType>

                        </xs:element>

                  </xs:sequence>

                  <xs:attribute name="Type" type="xs:string" use="required" />

            </xs:complexType>

      </xs:element>

</xs:schema>

 

The  ID node is for internal system use only and cannot be used as an unique identifier, rather the Item node should be used.  This ID attribute is NOT the SharePoint item ID.

Adding to an existing Content Field

Certain of the K2 SharePoint Wizards will allow the Content Field to be updated.

Fig 4. Adding a Document to "ExampleA" Content Field

How do you use the Content Field? 

Locate the Content Field and drag the node or individual nodes of the Content Field onto the corresponding field on the K2 Wizard screen. It is important to remember that Content Fields can be used as an input or output field. In certain scenarios the same Content Field will be used as an input and output field in the same wizard.

 

 


K2 blackpearl Help 4.6.10 (4.12060.1690.0)