Quick Start (Base64): Suspending process instances using the web service API

The following C# code example suspends a process instance. To successfully suspend a process instance, you require the process invocation identifier that can be obtained when invoking a long-lived process by using the Invocation API.

using System; 
using System.Collections; 
using System.ComponentModel; 
using System.Data; 
using System.IO ; 
 
/** 
    * This web service Quick Start suspends a process instance with the  
    * invocation identifier value of 1cac7df30a242fb100d573bd344da74e   
    */ 
 
namespace SuspendProcess 
{ 
    class Class1 
    { 
        [STAThread] 
        static void Main(string[] args) 
        { 
         try 
            { 
            //Create a ProcessManagerService object and set authentication values 
            ProcessManagerService processManager = new ProcessManagerService();  
            processManager.Credentials = new System.Net.NetworkCredential("administrator", "password"); 
 
            //Suspend a running process instance 
            processManager.suspendProcess("5fae07190a242fb1010b2229ccad8a7e");  
 
             } 
             catch (Exception ee) 
             { 
                 Console.WriteLine(ee.Message); 
             } 
 
        } 
    } 
}