Workday · Arazzo Workflow

Workday Request Leave of Absence

Version 1.0.0

Confirm a worker, review existing leaves, then submit a new leave of absence request.

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

Provider

workday

Workflows

request-leave-of-absence
Resolve a worker, review existing leaves, and submit a new leave request.
Reads the worker and their existing leaves of absence, then submits a new leave of absence request for the supplied leave type, dates, and reason.
3 steps inputs: authorization, comment, estimatedLastDayOfLeave, firstDayBackAtWork, firstDayOfLeave, lastDayOfWork, leaveType, reason, workerId outputs: existingLeaves, leaveId, workerDescriptor
1
getWorker
getWorkerById
Confirm the worker exists before reviewing leave data.
2
getExistingLeaves
getLeavesOfAbsence
Read the worker's existing leaves of absence to detect overlap.
3
submitLeave
requestLeaveOfAbsence
Submit the new leave of absence request.

Source API Descriptions

Arazzo Workflow Specification

workday-request-leave-of-absence-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Workday Request Leave of Absence
  summary: Confirm a worker, review existing leaves, then submit a new leave of absence request.
  description: >-
    A leave management flow. It resolves the worker, reads their existing
    leaves of absence so an overlapping leave can be detected, and then submits
    a new leave of absence request with the supplied dates and reason. 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: absenceManagementApi
  url: ../openapi/absenceManagement.yml
  type: openapi
workflows:
- workflowId: request-leave-of-absence
  summary: Resolve a worker, review existing leaves, and submit a new leave request.
  description: >-
    Reads the worker and their existing leaves of absence, then submits a new
    leave of absence request for the supplied leave type, dates, and reason.
  inputs:
    type: object
    required:
    - authorization
    - workerId
    - leaveType
    - firstDayOfLeave
    - reason
    properties:
      authorization:
        type: string
        description: OAuth2 bearer token, e.g. "Bearer eyJ...".
      workerId:
        type: string
        description: The Workday ID of the worker requesting leave.
      leaveType:
        type: object
        description: The leave type reference object (id, descriptor, href).
      firstDayOfLeave:
        type: string
        description: The first day of the leave (YYYY-MM-DD).
      estimatedLastDayOfLeave:
        type: string
        description: The estimated last day of the leave (YYYY-MM-DD).
      lastDayOfWork:
        type: string
        description: The worker's last day of work before leave (YYYY-MM-DD).
      firstDayBackAtWork:
        type: string
        description: The expected first day back at work (YYYY-MM-DD).
      reason:
        type: object
        description: The leave reason reference object (id, descriptor, href).
      comment:
        type: string
        description: An optional comment for the leave request.
  steps:
  - stepId: getWorker
    description: Confirm the worker exists before reviewing leave data.
    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: getExistingLeaves
    description: Read the worker's existing leaves of absence to detect overlap.
    operationId: getLeavesOfAbsence
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: ID
      in: path
      value: $inputs.workerId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      existingLeaves: $response.body#/data
  - stepId: submitLeave
    description: Submit the new leave of absence request.
    operationId: requestLeaveOfAbsence
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: ID
      in: path
      value: $inputs.workerId
    requestBody:
      contentType: application/json
      payload:
        leaveType: $inputs.leaveType
        firstDayOfLeave: $inputs.firstDayOfLeave
        estimatedLastDayOfLeave: $inputs.estimatedLastDayOfLeave
        lastDayOfWork: $inputs.lastDayOfWork
        firstDayBackAtWork: $inputs.firstDayBackAtWork
        reason: $inputs.reason
        comment: $inputs.comment
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      leaveId: $response.body#/id
      startDate: $response.body#/startDate
  outputs:
    workerDescriptor: $steps.getWorker.outputs.workerDescriptor
    existingLeaves: $steps.getExistingLeaves.outputs.existingLeaves
    leaveId: $steps.submitLeave.outputs.leaveId