ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Workflow.Client.Models Namespace / IJobsManager Interface / StopSteps Method
Example

In This Topic
    StopSteps Method
    In This Topic
    Stops running the steps in the array. Each step can be Run again or Finish can be used to complete them. In case of GP step and question step, the processing of each step is cancelled. In case of manual and open app step, each step is paused. Each step can be forced to stop by a user not assigned to the step with the jobForceStop privilege. This method must be called on the MCT. Use QueuedTask.Run. If no stepIds are specified, then all the current steps will be stopped.
    Syntax
    void StopSteps( 
       string jobId,
       List<string> stepIds
    )
    Sub StopSteps( _
       ByVal jobId As String, _
       Optional ByVal stepIds As List(Of String) _
    ) 

    Parameters

    jobId
    stepIds
    Example
    QueuedTask.Run(() => { var id = WorkflowClientModule.JobsManager.GetJobId(); var stepIds = new List() { "123456789", "234567890" }; WorkflowClientModule.JobsManager.StopSteps(id, stepIds); });
    How to stop running steps on a job
    var jobManager = WorkflowClientModule.JobsManager;
    // Get the job Id associated with the active map view
    var jobId = jobManager.GetJobId();
    // Stop the current steps in the job with the given id.
    jobManager.StopSteps(jobId);
    How to stop specific running steps on a job
    var jobManager = WorkflowClientModule.JobsManager;
    // Get the job Id associated with the active map view
    var jobId = jobManager.GetJobId();
    // Specify specific running steps in a job to stop
    stepIds = new List<string> { "step12345", "step67890" };
    jobManager.StopSteps(jobId, stepIds);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also