ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Workflow.Models.JobModels Namespace / Job Class / GetCurrentSteps Method
Example

In This Topic
    GetCurrentSteps Method
    In This Topic
    Returns the current active step IDs for the job
    Syntax
    public IReadOnlyList<string> GetCurrentSteps()
    Public Function GetCurrentSteps() As IReadOnlyList(Of String)

    Return Value

    The IDs of the current steps
    Example
    How to Execute a step on a job
    // Gets the current step
    // checks to see if it can execute it
    // proceeds to do so if it can
    var wfCon = await WorkflowModule.ConnectAsync();
    var jobManager = wfCon.GetManager<JobsManager>();
    var job = jobManager.GetJob(jobID);
    string stepID = job.GetCurrentSteps().First();
    if (job.CanExecuteStep(stepID).Item1)
      job.ExecuteStep(stepID);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also