Skip to main content

We have requirement that users should be able to track the status of K2 black pearl process in the MOSS site after process being initiated and the report / web part should provide some custom (business) information.


 

Could you please let us know how to achieve this requirement in K2 Black pearl?


 

Appreciate your help.


 

Thanks


JayaPrakash N M

Hi,


When the user submits the request, you can send a mail to the submitter with a link to view the status of his request.


http://k2Server/Workspace/Tasklistcontrol/ViewFlowMain.aspx?ProcessID=1000&K2Server=YourK2Server. This not only shows the status of the request but also the time it took for various approvers to approve it as well as the data at each level.


Thanks Max, let me explain the my requirement  


 


 


I think K2 does not provide any option to view the status of the workflow that is still running or active (i.e. once the originator or participant start or interact with the workflow, then work item will disappear from his K2 work list. He can not trace the workflow status).


 


 


User should be able to see all his active process instances status in this web part. (I.e. he is either originator or participant) and the web part has following fields to be displayed.


 




 


Process Name


Process Instance Name (Folio Name)


Process Status (This is process variable and this value is set in the workflow based on the workflow stage)  


Process Date


Process Originator


View Flow Link of the instance  


 


 


I did a sample using the Client API that calls “Process _Instance.List” SMO using the originator filter. It gives results except Process Status.


 


Please let us know,


1)       is there any way to read the process variable of each instance


2)       How can I filter the result based on the participant


 


Please take a look at this blog on using existing K2 Reporting SmO to return information.
http://www.k2underground.com/blogs/fromthebench/archive/2008/06/02/how-to-retrieve-process-instance-reporting-data.aspx


 It's very similiar to your requirements. If you need data from the process, try looking into the Process XML SmO.


I wrote a code sample (shown below) to retrieve the data from the Smart object. It’s working in ASP.NET web application.


 


But it’s giving error “Authentication required for session”, when I integrate this code in the MOSS custom web part.  Please let me know the issue.


 


Code snippet


 


SOConnection soConn = new SOConnection(“RC1MSVS0024”, 5555);


  SOCommand soCommand = new SOCommand();


                soCommand.Connection = soConn;


                soCommand.CommandText = "Process_Instance.List";


                soCommand.CommandType = CommandType.StoredProcedure;


                soCommand.Parameters.AddWithValue("@Originator", "K2:" + this.Context.User.Identity.Name);


                 soCommand.Parameters.AddWithValue("@ProcessName", “MyProcess”);


                 soCommand.Parameters.AddWithValue("@Status", “Active”);


                 ds = new DataSet("MyProcSet");


                SODataAdapter da = new SODataAdapter(soCommand);


                da.Fill(ds, "MyProcesses");


 


Thanks


Jayaprakash N M


Have you tried looking at these two blackmarket projects?


MyProcesses Webpart http://k2underground.com/k2/ProjectHome.aspx?ProjectID=35


MyProcesses Webpart Lite http://k2underground.com/k2/ProjectHome.aspx?ProjectID=103


Reply