Workday · Arazzo Workflow

Workday Terminate Worker

Version 1.0.0

Confirm a worker and review their organization assignments, then initiate a termination event.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Cloud ComputingEnterprise SoftwareFinancial ManagementHCMSaaSArazzoWorkflows

Provider

workday

Workflows

terminate-worker
Resolve a worker, review assignments, then initiate a termination event.
Reads the worker and their organization assignments, then initiates a termination event with the supplied termination date, last day of work, and reasons.
3 steps inputs: authorization, lastDayOfWork, localTerminationReason, notifyEmployee, primaryReason, regrettable, terminationDate, workerId outputs: assignments, terminationId, workerDescriptor
1
getWorker
getWorkerById
Confirm the worker exists before initiating a termination.
2
getAssignments
getOrganizationAssignments
Review the worker's current organization assignments.
3
terminate
terminateWorker
Initiate the termination event for the worker.

Source API Descriptions

Arazzo Workflow Specification

workday-terminate-worker-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Workday Terminate Worker
  summary: Confirm a worker and review their organization assignments, then initiate a termination event.
  description: >-
    An offboarding flow. It resolves the worker, reviews their current
    organization assignments so the offboarding context is captured, and then
    initiates a termination event with the supplied dates and reasons. 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: hcmApi
  url: ../openapi/hcm.yml
  type: openapi
- name: staffingApi
  url: ../openapi/staffing.yml
  type: openapi
workflows:
- workflowId: terminate-worker
  summary: Resolve a worker, review assignments, then initiate a termination event.
  description: >-
    Reads the worker and their organization assignments, then initiates a
    termination event with the supplied termination date, last day of work, and
    reasons.
  inputs:
    type: object
    required:
    - authorization
    - workerId
    - terminationDate
    - primaryReason
    properties:
      authorization:
        type: string
        description: OAuth2 bearer token, e.g. "Bearer eyJ...".
      workerId:
        type: string
        description: The Workday ID of the worker to terminate.
      terminationDate:
        type: string
        description: The termination date (YYYY-MM-DD).
      lastDayOfWork:
        type: string
        description: The worker's last day of work (YYYY-MM-DD).
      primaryReason:
        type: object
        description: The primary termination reason reference object (id, descriptor, href).
      localTerminationReason:
        type: object
        description: The local termination reason reference object (id, descriptor, href).
      regrettable:
        type: boolean
        description: Whether the termination is regrettable.
      notifyEmployee:
        type: boolean
        description: Whether to notify the employee.
  steps:
  - stepId: getWorker
    description: Confirm the worker exists before initiating a termination.
    operationId: getWorkerById
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: ID
      in: path
      value: $inputs.workerId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      workerDescriptor: $response.body#/descriptor
  - stepId: getAssignments
    description: Review the worker's current organization assignments.
    operationId: getOrganizationAssignments
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: ID
      in: path
      value: $inputs.workerId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      assignments: $response.body#/data
  - stepId: terminate
    description: Initiate the termination event for the worker.
    operationId: terminateWorker
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: ID
      in: path
      value: $inputs.workerId
    requestBody:
      contentType: application/json
      payload:
        terminationDate: $inputs.terminationDate
        lastDayOfWork: $inputs.lastDayOfWork
        primaryReason: $inputs.primaryReason
        localTerminationReason: $inputs.localTerminationReason
        regrettable: $inputs.regrettable
        notifyEmployee: $inputs.notifyEmployee
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      terminationId: $response.body#/id
      terminationDescriptor: $response.body#/descriptor
  outputs:
    workerDescriptor: $steps.getWorker.outputs.workerDescriptor
    assignments: $steps.getAssignments.outputs.assignments
    terminationId: $steps.terminate.outputs.terminationId