Accessing the View Flow URL

The View Flow report's URL can be accessed through the SourceCode.Workflow.Client API, as shown below:

Copy

Access the View Flow report

using(SourceCode.Workflow.Client.Connection K2Conn = new Connection()) {
    //open a simple connection for simplicity
    K2Conn.Open("localhost");

    //Opening the Process Instance from the Connection object
    ProcessInstance pi = K2Conn.OpenProcessInstance(1); //Change to your process instance ID
    //get the View Flow URL
    string url1 = pi.ViewFlow;

    //Opening the Process Instance from a worklist item
    string serialNo = "[serialnumber]"; //Change to your serial number
    WorklistItem wli = K2Conn.OpenWorklistItem(serialNo);
    string url2 = wli.ProcessInstance.ViewFlow;
}