Пример #1
0
 //sample: simple list method for the Workflow General/Process Instance SmartObject
 static void ExecuteListMethodWCF()
 {
     Console.WriteLine("Executing simple List method via WCF");
     //set up the service client
     WorkflowGeneralReport_WCFService.Process_InstanceSvcClient processInstanceSvcClient = new Process_InstanceSvcClient();
     //set credentials
     processInstanceSvcClient.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
     //call the appropriate method. Note that we are passing a data contract into the method specifying the object we want returned
     WorkflowGeneralReport_WCFService.Process_Instance[] processInstanceList = processInstanceSvcClient.Process_InstanceSvc_List(new Process_Instance());
     foreach (Process_Instance processInstance in processInstanceList)
     {
         Console.WriteLine("Folio: " + processInstance.Folio + " | ProcInstID: " + processInstance.ProcessInstanceID.ToString() + " | Status: " + processInstance.Status);
     }
     Console.WriteLine("Completed execution of simple List method via WCF");
     Console.ReadLine();
 }