3. Create K2 Application Elements for the Site Requests List

In this step, you create application elements for the Site Requests list. Application elements are components which interact with each other to form a complete application. They include data (SmartObjects), forms (SmartForms), workflow, and reports. The data component is a SmartObject based on the Site Requests list. The forms component includes add, edit, and display SmartForms which take the place of standard SharePoint forms. The workflow component starts when you add a new item to the list and finally, the reports component shows statistics on each workflow instance.

  1. Create application elements for the Site Requests list with the following components: Data, Forms, Workflow, and Reports. Use the tables below for configuring each component.
    Data Settings
    SettingValueNotes
    Create SmartObjectA new SmartObject will be created for this list/library. K2 creates a SmartObject based on the Site Requests list.
    Form Settings
    SettingValueNotes
    Use K2 smartforms as the New, Edit and Display forms for this list/libraryCHECKEDUse K2-generated forms instead of the standard SharePoint forms.
    Workflow Settings
    SettingValueNotes
    Workflow NameSite Requests Workflow

    This is the name of the workflow as it appears in reports.

    If you are working in a shared environment, make sure the workflow name is unique. For example, you can add your initials to the workflow name (Site Requests Workflow KL).
    Start OptionWhen a SmartForm is submittedThe workflow starts when you submit the form.
    FormNew Site RequestsThis is the name of the form you use to start the workflow.
    Reports Settings
    SettingValueNotes
    Create ReportsCHECKEDAdd standard K2 reports to the application.
    1. From the Site Requests landing page, click the K2 menu, then Application.
      Application Icon - K2 Group
    2. The Create K2 Application page opens. The first section is the Data component. K2 checks this option by default. Because you are creating application elements from the list itself, K2 assumes you want to create a SmartObject based on the list.
      Data Component
    3. In the Forms section, CHECK the box to Create SmartForms. CHECK the box to Use K2 smartforms as the New, Edit and Display forms for this list/library. This option replaces the standard SharePoint new, edit, and display forms with the generated new, edit, and display SmartForms. You can switch back to the SharePoint forms at any time. SmartForms allow you greater flexibility for editing the layout, styling, and configuration of the form behavior.
      Forms Component
    4. In the Workflow section, CHECK the box to Create Workflow. Keep the default workflow name,
      Site Requests Workflow
      then confirm the start workflow rule is When a SmartForm is submitted using the New Site Requests form.
      Note: If you are working in a shared environment, make sure the workflow name is unique. For example, you can add your initials to the workflow name (Site Requests Workflow KL).
      Workflow Component
    5. In the Reports section, CHECK the box to Create Reports. In a later step, you explore standard reporting features and the data returned. Click OK at the bottom of the page to create the K2 application elements.
      Reports Component
    6. When you create a new workflow from the Create K2 Application page, K2 generates the application, then launches the workflow designer.

      The K2 Workflow Designer environment contains four primary sections:

      • the Toolbox on the left-side of the page
      • the Design Canvas in the center of the page
      • the Configuration Panel on the right-side of the page
      • the Context Browser located within the Configuration Panel

      The Toolbox is where you will find the different types of steps that you can add to a workflow. You can drag and drop the steps you need for your workflow onto the canvas. User steps usually involve human interaction, such as a person having to make a decision for the workflow to continue. System steps, such as sending an email or updating data in some other system, are performed by the K2 server. Lines connect steps to each other, and define the "path" that the workflow will follow.

      Accessing steps in the Toolbox
      Adding Steps from the Toolbox

      The Design Canvas is where you drag and drop the steps you need for constructing your workflow. You can move the workflow around by clicking within the canvas, then dragging your mouse to a new location. This is helpful if your workflow is larger than your browser screen.

      Moving the workflow around the design canvas
      Moving the Workflow Around the Canvas

      The Configuration Panel contains the settings for each step. After highlighting a step on the canvas and expanding the Configuration Panel, the Configuration Panel will display a series of tabs. The tabs are specific to the step type. The Configuration Panel also contains the Context Browser. The Context Browser provides access to variables, functions, SmartObjects, and workflow variables.

      Accessing step tabs in the Configuration Panel; expanding the Context Browser
      The Configuration Panel and Context Browser

Review

In this step, you generated application elements for the Site Requests list. The data component creates a SmartObject based on the list. The forms component creates new, edit, and display SmartForms that replace the standard SharePoint forms. The workflow component starts a new workflow when you submit the request form. Finally, the reports component provides details on active and completed workflow instances.

Next Step: 4. Build the Site Requests Workflow