WCF Service

  • 12 August 2011
  • 1 reply
  • 2 views

Badge +2

I am wondering if there is anyway to retrieve all worklist items from the WCF service. Currently all I am getting back when writing a sample app are those worklist items assigned to me. Previously we had used code like below to impersonate a user based on login, but I can't seem to figure out a way to do the same through the service. Any help would be appreciated.



ConnectionSetup K2ConSetup = new ConnectionSetup();


                    K2ConSetup.ConnectionParameters.Add(ConnectionSetup.ParamKeys.Host, ConfigurationManager.AppSettings["K2Server"]);


                    K2ConSetup.ConnectionParameters.Add(ConnectionSetup.ParamKeys.TimeOut, ConfigurationManager.AppSettings["K2ConnTimeOut"]);


                    //Open a connection to the K2[blackpearl] server


                    K2Con.Open(K2ConSetup);


                    K2Con.ImpersonateUser(login);


                    Worklist K2WorkList = K2Con.OpenWorklist("ASP");


                    K2Con.RevertUser();



1 reply

Badge +10

Hi,


I don't believe this is possible using the WCF services.


You will need to write your own WCF Service or web service to accomplish this. In the custom service you will use the SourceCode.Workflow.Client API to impersonate and open the tasks.


Regards,

Reply