Error with (m_oK2ROMConn.ViewProcessInstance(m_oWorklistItem.ProcessInstance.ID)); in K2 Blackperl

  • 24 June 2011
  • 1 reply

Badge +2

Good day K2 Experts,

We just upgraded from K2.NET 2003 to K2 Blackperl.

I used the below code to view the process in K2.NET 3003, it worked like a charm.




//Open the FlowView Form



frmFlowView flowview = new frmFlowView


But when I run the same code in K2 Blackperl,  I get the beow exception.

Please could anyone assist me with this. Thanks in advance.


Object reference not set to the instance of an object in K2 ROM

   at Client.Throw(String s, Exception e)
   at Client.InternalCall(UInt32 sock, ArchiveX ar, Int32 hdr)
   at Client.Call(ArchiveX ar, Int32 hdr)
   at SourceCode.K2ROM.Connection.CallFunction(ArchiveX ar)
   at SourceCode.K2ROM.Connection.ViewProcessInstance(Int32 PID)
   at JPC.Client.Workflow.Workspace.labelControl1_Click(Object sender, EventArgs e) in C:Worklist Latest SourceJPC.Client.WorkflowWorkspace.cs:line 14338
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at DevExpress.Utils.Controls.ControlBase.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)




1 reply

Badge +11

It's been so many years since I have seen 2003 it is hard to remember what the viewflow looks like.  In blackpearl, you can access the viewflow via a URL.  In one of your environments open the viewflow through K2 Workspace and look at the query string parameters, they are pretty easy to figure out.