Workday · Arazzo Workflow

Workday Review Expense Reports

Version 1.0.0

List expense reports, load the first report's detail, and cross-reference accounting journals.

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

Provider

workday

Workflows

review-expense-reports
List expense reports, load the first, and cross-reference accounting journals.
Lists expense reports, then branches: if any exist it loads the first report's detail and lists accounting journals for reconciliation, otherwise it ends.
3 steps inputs: authorization outputs: firstReportId, journals, totalAmount
1
listExpenseReports
getExpenseReports
List expense reports.
2
getReportDetail
getExpenseReportById
Load the detail record for the first expense report.
3
listJournals
getAccountingJournals
List accounting journals to reconcile the expense against the ledger.

Source API Descriptions

Arazzo Workflow Specification

workday-review-expense-reports-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Workday Review Expense Reports
  summary: List expense reports, load the first report's detail, and cross-reference accounting journals.
  description: >-
    A financial review flow. It lists expense reports and branches on whether
    any exist: when at least one is returned it loads the first report's detail
    and then lists the accounting journals so the expense can be reconciled
    against the ledger, and when none are returned it ends. 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: financialManagementApi
  url: ../openapi/financialManagement.yml
  type: openapi
workflows:
- workflowId: review-expense-reports
  summary: List expense reports, load the first, and cross-reference accounting journals.
  description: >-
    Lists expense reports, then branches: if any exist it loads the first
    report's detail and lists accounting journals for reconciliation, otherwise
    it ends.
  inputs:
    type: object
    required:
    - authorization
    properties:
      authorization:
        type: string
        description: OAuth2 bearer token, e.g. "Bearer eyJ...".
  steps:
  - stepId: listExpenseReports
    description: List expense reports.
    operationId: getExpenseReports
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstReportId: $response.body#/data/0/id
    onSuccess:
    - name: hasReports
      type: goto
      stepId: getReportDetail
      criteria:
      - context: $response.body
        condition: $.data.length > 0
        type: jsonpath
    - name: noReports
      type: end
      criteria:
      - context: $response.body
        condition: $.data.length == 0
        type: jsonpath
  - stepId: getReportDetail
    description: Load the detail record for the first expense report.
    operationId: getExpenseReportById
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: ID
      in: path
      value: $steps.listExpenseReports.outputs.firstReportId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      reportDescriptor: $response.body#/descriptor
      totalAmount: $response.body#/totalAmount
  - stepId: listJournals
    description: List accounting journals to reconcile the expense against the ledger.
    operationId: getAccountingJournals
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      journals: $response.body#/data
  outputs:
    firstReportId: $steps.listExpenseReports.outputs.firstReportId
    totalAmount: $steps.getReportDetail.outputs.totalAmount
    journals: $steps.listJournals.outputs.journals