Tango · Arazzo Workflow

Tango Resolve a Failed Line Item

Version 1.0.0

Inspect a line item and branch — resend it when fulfilled, otherwise reissue it.

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

Provider

tango

Workflows

resolve-line-item
Read a line item, then resend it if fulfilled or reissue it otherwise.
Reads a reward line item and branches on its status to either resend the existing reward or reissue a new one, confirming the result.
4 steps inputs: referenceLineItemId outputs: finalStatus, referenceLineItemId
1
getLineItem
getLineItem
Read the line item by reference id to inspect its current fulfillment status.
2
resendLineItem
resendLineItem
Resend the fulfilled line item to the original recipient.
3
reissueLineItem
reissueLineItem
Reissue a fresh reward for the line item that had not been fulfilled.
4
confirmLineItem
getLineItem
Read the line item back to confirm its status after the recovery action.

Source API Descriptions

Arazzo Workflow Specification

tango-resolve-line-item-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Tango Resolve a Failed Line Item
  summary: Inspect a line item and branch — resend it when fulfilled, otherwise reissue it.
  description: >-
    A delivery-recovery pattern for a single reward line item. The workflow reads
    the line item by reference id, then branches on its status: when the item is
    already fulfilled it resends the existing reward to the recipient, and when
    it is not yet fulfilled it reissues a fresh reward. Each branch reads the line
    item back to confirm the outcome. 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: resolve-line-item
  summary: Read a line item, then resend it if fulfilled or reissue it otherwise.
  description: >-
    Reads a reward line item and branches on its status to either resend the
    existing reward or reissue a new one, confirming the result.
  inputs:
    type: object
    required:
    - referenceLineItemId
    properties:
      referenceLineItemId:
        type: string
        description: Reference id of the line item to resolve.
  steps:
  - stepId: getLineItem
    description: >-
      Read the line item by reference id to inspect its current fulfillment
      status.
    operationId: getLineItem
    parameters:
    - name: referenceLineItemId
      in: path
      value: $inputs.referenceLineItemId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      referenceLineItemId: $response.body#/referenceLineItemId
      lineItemStatus: $response.body#/status
    onSuccess:
    - name: alreadyFulfilled
      type: goto
      stepId: resendLineItem
      criteria:
      - context: $response.body
        condition: $.status == "FULFILLED"
        type: jsonpath
    - name: notFulfilled
      type: goto
      stepId: reissueLineItem
      criteria:
      - context: $response.body
        condition: $.status != "FULFILLED"
        type: jsonpath
  - stepId: resendLineItem
    description: >-
      Resend the fulfilled line item to the original recipient.
    operationId: resendLineItem
    parameters:
    - name: referenceLineItemId
      in: path
      value: $steps.getLineItem.outputs.referenceLineItemId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      referenceLineItemId: $response.body#/referenceLineItemId
      lineItemStatus: $response.body#/status
    onSuccess:
    - name: resendDone
      type: goto
      stepId: confirmLineItem
  - stepId: reissueLineItem
    description: >-
      Reissue a fresh reward for the line item that had not been fulfilled.
    operationId: reissueLineItem
    parameters:
    - name: referenceLineItemId
      in: path
      value: $steps.getLineItem.outputs.referenceLineItemId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      referenceLineItemId: $response.body#/referenceLineItemId
      lineItemStatus: $response.body#/status
  - stepId: confirmLineItem
    description: >-
      Read the line item back to confirm its status after the recovery action.
    operationId: getLineItem
    parameters:
    - name: referenceLineItemId
      in: path
      value: $steps.getLineItem.outputs.referenceLineItemId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      lineItemStatus: $response.body#/status
  outputs:
    referenceLineItemId: $steps.getLineItem.outputs.referenceLineItemId
    finalStatus: $steps.confirmLineItem.outputs.lineItemStatus