Skip to main content

Hi,


Please let me know the difference of opening an worklist item to perform any action.


1. If i use openworklistitem by passing serial number what will happen in performance wise
    Sample Code :
                WorklistItem wi;
                wi = K2Server.OpenWorklistItem(SerialNumber, "ASP");


2. If i use worklist criteria by calling addfilterfield what will happen in performance wise.
    Sample Code:


            WorklistCriteria wc = new WorklistCriteria();
            wc.AddFilterField(WCField.SerialNumber, WCCompare.Equal, SerialNumber);
            K2Server.OpenWorklist(wc);



Which approcah is better under which scenario.


Thanks in advance


Regards,
Praveena


 

If you are using the Out of Office (OOF) feature, you need to use the WorklistCriteria object as that is the only way to retrieve the workitems delegated to you.  Just using the default OpenWorkList call only pulls the workitems belonging to you (i.e. you are the original destination).


When using OOF, the code should look something like this for the open worklist call.


                oConn.Open("myServer");
                oWC.Platform = "ASP";
                oWC.AddFilterField(WCLogical.Or, WCField.WorklistItemOwner, "Me", WCCompare.Equal, WCWorklistItemOwner.Me);
                oWC.AddFilterField(WCLogical.Or, WCField.WorklistItemOwner, "Other", WCCompare.Equal, WCWorklistItemOwner.Other);
                oWL = oConn.OpenWorklist(oWC);


Reply