Tango · Arazzo Workflow

Tango Freeze and Cancel a Line Item

Version 1.0.0

Freeze a line item to suspend delivery, then cancel it and confirm the cancellation.

1 workflow 1 source API 1 provider
View Spec View on GitHub Catalog ManagementDigital RewardsGift CardsIncentivesLoyaltyRewards As A ServiceArazzoWorkflows

Provider

tango

Workflows

freeze-and-cancel-line-item
Freeze a line item, cancel it, then confirm the cancellation.
Suspends delivery of a line item by freezing it, cancels it, and reads the item back to confirm it is cancelled.
3 steps inputs: referenceLineItemId outputs: finalStatus, referenceLineItemId
1
freezeLineItem
freezeLineItem
Freeze the line item to immediately suspend its delivery.
2
cancelLineItem
cancelLineItem
Cancel the frozen line item so it will not be fulfilled.
3
confirmCancelled
getLineItem
Read the line item back to confirm it is now cancelled.

Source API Descriptions

Arazzo Workflow Specification

tango-freeze-and-cancel-line-item-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Tango Freeze and Cancel a Line Item
  summary: Freeze a line item to suspend delivery, then cancel it and confirm the cancellation.
  description: >-
    A fraud or error mitigation pattern. The workflow freezes a line item to
    immediately suspend its delivery, cancels the now-frozen item so it will not
    be fulfilled, and reads the line item back to confirm the cancelled status.
    Every step spells out its request inline so the flow can be read and executed
    without opening the underlying OpenAPI description. Authentication uses the
    platform's HTTP Basic credentials declared by the basicAuth security scheme;
    those credentials are applied at the transport layer and are not request
    parameters.
  version: 1.0.0
sourceDescriptions:
- name: tangoRaasApi
  url: ../openapi/tango-raas-api-openapi.yml
  type: openapi
workflows:
- workflowId: freeze-and-cancel-line-item
  summary: Freeze a line item, cancel it, then confirm the cancellation.
  description: >-
    Suspends delivery of a line item by freezing it, cancels it, and reads the
    item back to confirm it is cancelled.
  inputs:
    type: object
    required:
    - referenceLineItemId
    properties:
      referenceLineItemId:
        type: string
        description: Reference id of the line item to freeze and cancel.
  steps:
  - stepId: freezeLineItem
    description: >-
      Freeze the line item to immediately suspend its delivery.
    operationId: freezeLineItem
    parameters:
    - name: referenceLineItemId
      in: path
      value: $inputs.referenceLineItemId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      referenceLineItemId: $response.body#/referenceLineItemId
      lineItemStatus: $response.body#/status
  - stepId: cancelLineItem
    description: >-
      Cancel the frozen line item so it will not be fulfilled.
    operationId: cancelLineItem
    parameters:
    - name: referenceLineItemId
      in: path
      value: $steps.freezeLineItem.outputs.referenceLineItemId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      referenceLineItemId: $response.body#/referenceLineItemId
      lineItemStatus: $response.body#/status
  - stepId: confirmCancelled
    description: >-
      Read the line item back to confirm it is now cancelled.
    operationId: getLineItem
    parameters:
    - name: referenceLineItemId
      in: path
      value: $steps.cancelLineItem.outputs.referenceLineItemId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      lineItemStatus: $response.body#/status
  outputs:
    referenceLineItemId: $steps.cancelLineItem.outputs.referenceLineItemId
    finalStatus: $steps.confirmCancelled.outputs.lineItemStatus