ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Workflow.Models.JobModels Namespace / Job Class / CompleteStep(String) Method
The ID of the step to mark as complete. If no step is specified, the current step will be marked as complete
Example Version

CompleteStep(String) Method
Marks the specified step as complete
Syntax
public WorkflowExecutionResult CompleteStep( 
   string stepID
)

Parameters

stepID
The ID of the step to mark as complete. If no step is specified, the current step will be marked as complete

Return Value

Information on the return code and errors during completion
Remarks
User should ensure the result of CanCompleteStepAsync is true prior to completing the step.
Example
Complete the current step and check for an exception
WorkflowExecutionResult result = job.CompleteStep();
// Check if the step threw an exception
if (result.Exception != null)
{
    // Throw it for a higher level to deal with
    throw result.Exception;
}
if (result.HasReturnCode)
{
    return result.ReturnCode;
}
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also