Introduction

The View Flow field has been added to the Workflow Context Browser under the Process Instance node. This field can be used in workflows where the View Flow should be resolved as an URL at runtime. The URL is specific to the Process Instance and would typically resemble the following:

http://dlx:81/ViewFlow/ViewFlow.aspx?ProcessID=5, where the ProcessID represents the ID of the specific Process Instance.

Implementation Details

The View Flow field is available under the Process Instance node in the Workflow Context Browser of K2 Studio and K2 Designer for Visual Studio.

Image

The View Flow field is also available in the Workflow Context node of the Context Browser in K2 Designer for SharePoint.

Image

When using the View Flow field in an Event Notification message for example, the URL of the View Flow is displayed and can be clicked to open the View Flow of that specific Process Instance.

Image
Image

Example Scenario

The following scenario illustrates how View Flow can be used as a Hyperlink in a SharePoint column.

We have an expense item that gets created and kicks off a workflow process. As soon as the workflow process is started, we want to populate the URL of the View Flow Report in the SharePoint column to enable the user to view the color coded graphical representation of the workflow process within the SharePoint List.

Follow the steps below to configure the View Flow as a Hyperlink in a SharePoint column:

  1. Create a SharePoint List or Library and add a column of type Hyperlink. Call it View Workflow Report
  2. Create a process in K2 Studio.
  3. Drag the SharePoint Workflow Integration Process Wizard onto the canvas, configure it (in Advanced Mode) and specify the SharePoint Site and List or Library  
    Image
  4. Select a Start Option such as Automatically start this workflow when a new item is created  
    Image
  5. Finish the wizard.
  6. Drag the SharePoint List Items Event Wizard onto the canvas.
  7. Select Update List Items > SharePoint List Item on the first screen.
    Image
  8. Provide the SharePoint Site URL, List Name and List Item ID. The List Item ID can be found in the Process/Activity Data tab of the Context Browser under XML Fields.  The workflow process needs the SharePoint ID to know which item should be updated.
    Image
  9. Select View Workflow Report, click Assign and select Specific value for selected column
    Image
  10. Open the Workflow Context Browser and select View Flowfrom the Process Instance node.
     Image
  11. Finish the wizard.
  12. Save and deploy the process.
  13. Start the workflow process by creating a new SharePoint List item. The workflow process is started and the View Flow Hyperlink is updated
     Image
  14. Click on the URL provided in the View Workflow Report column to open the View Flow Report for that specific instance.
     Image