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.
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.
The View Flow field is also available in the Workflow Context node of the Context Browser in K2 Designer for SharePoint.
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.
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:
- Create a SharePoint List or Library and add a column of type Hyperlink. Call it View Workflow Report
- Create a process in K2 Studio.
- Drag the SharePoint Workflow Integration Process Wizard onto the canvas, configure it (in Advanced Mode) and specify the SharePoint Site and List or Library
- Select a Start Option such as Automatically start this workflow when a new item is created
- Finish the wizard.
- Drag the SharePoint List Items Event Wizard onto the canvas.
- Select Update List Items > SharePoint List Item on the first screen.
- 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.
- Select View Workflow Report, click Assign and select Specific value for selected column
- Open the Workflow Context Browser and select View Flowfrom the Process Instance node.
- Finish the wizard.
- Save and deploy the process.
- Start the workflow process by creating a new SharePoint List item. The workflow process is started and the View Flow Hyperlink is updated
- Click on the URL provided in the View Workflow Report column to open the View Flow Report for that specific instance.