UiPath · Arazzo Workflow

UiPath Find and Stop a Running Job

Version 1.0.0

Locate a currently running job and send it a stop signal.

1 workflow 1 source API 1 provider
View Spec View on GitHub AutomationRobotic Process AutomationRPAArtificial IntelligenceDocument ProcessingEnterprise AutomationOrchestrationTestingArazzoWorkflows

Provider

uipath

Workflows

stop-running-job
Discover a running job and stop it using the chosen strategy.
Lists running jobs to obtain the ID of the first match, then issues a stop request with the supplied strategy.
2 steps inputs: folderId, jobFilter, strategy outputs: stoppedJobId
1
findRunningJob
listJobs
List jobs in the folder filtered to the Running state, ordered by most recent creation, returning the ID of the job to stop.
2
stopJob
stopJob
Send a stop signal to the discovered running job using the supplied strategy.

Source API Descriptions

Arazzo Workflow Specification

uipath-stop-running-job-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: UiPath Find and Stop a Running Job
  summary: Locate a currently running job and send it a stop signal.
  description: >-
    An operational control pattern for Orchestrator. The workflow lists jobs
    filtered to the Running state to discover the job ID of an active execution,
    then sends a stop signal using the requested strategy — SoftStop to let the
    current activity finish, or Kill to terminate immediately. Every step spells
    out its request inline so the flow can be read and executed without opening
    the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: orchestratorApi
  url: ../openapi/uipath-orchestrator-openapi.yml
  type: openapi
workflows:
- workflowId: stop-running-job
  summary: Discover a running job and stop it using the chosen strategy.
  description: >-
    Lists running jobs to obtain the ID of the first match, then issues a stop
    request with the supplied strategy.
  inputs:
    type: object
    required:
    - folderId
    - strategy
    properties:
      folderId:
        type: integer
        description: Numeric folder ID used as the organization unit context.
      strategy:
        type: string
        description: Stop strategy, either SoftStop or Kill.
      jobFilter:
        type: string
        description: Optional additional OData filter to further narrow the running job (e.g. ReleaseName eq 'Invoicing').
  steps:
  - stepId: findRunningJob
    description: >-
      List jobs in the folder filtered to the Running state, ordered by most
      recent creation, returning the ID of the job to stop.
    operationId: listJobs
    parameters:
    - name: $filter
      in: query
      value: "State eq 'Running'"
    - name: $orderby
      in: query
      value: CreationTime desc
    - name: $top
      in: query
      value: 1
    - name: X-UIPATH-OrganizationUnitId
      in: header
      value: $inputs.folderId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      jobId: $response.body#/value/0/Id
      jobState: $response.body#/value/0/State
  - stepId: stopJob
    description: >-
      Send a stop signal to the discovered running job using the supplied
      strategy.
    operationId: stopJob
    parameters:
    - name: X-UIPATH-OrganizationUnitId
      in: header
      value: $inputs.folderId
    requestBody:
      contentType: application/json
      payload:
        jobId: $steps.findRunningJob.outputs.jobId
        strategy: $inputs.strategy
    successCriteria:
    - condition: $statusCode == 200
  outputs:
    stoppedJobId: $steps.findRunningJob.outputs.jobId