Appian · Arazzo Workflow

Appian Gated Inspect-then-Import Promotion

Version 1.0.0

Inspect a package first and only import it when the inspection reports no blocking errors.

1 workflow 1 source API 1 provider
View Spec View on GitHub AutomationBPMBusiness Process ManagementEnterprise SoftwareLow-CodeProcess AutomationRPAWorkflowArazzoWorkflows

Provider

appian

Workflows

inspect-then-import
Gate an import behind a clean inspection and complete the deployment.
Inspects a package, waits for the inspection to finish, and only imports the package when no blocking errors are found, then polls the import to a terminal status and retrieves the deployment log.
5 steps inputs: adminConsoleSettingsFileName, apiKey, customizationFileName, description, name, packageFileName outputs: deploymentUuid, importStatus, inspectionUuid, log
1
startInspection
createInspection
Create an inspection for the package and settings to detect any blocking problems before the import gate.
2
pollInspection
getInspectionResults
Poll the inspection until it completes, then gate on the error count: a clean inspection proceeds to import while errors stop the promotion.
3
startImport
createDeployment
Create the import deployment now that inspection passed with no blocking errors, attaching the same package and settings files.
4
pollImport
getDeploymentResults
Poll the import deployment until it leaves the IN_PROGRESS state and capture the final import status and object summary.
5
fetchLog
getDeploymentLog
Retrieve the plain-text deployment log for the completed import to close out the promotion with a full record.

Source API Descriptions

Arazzo Workflow Specification

appian-inspect-then-import-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Appian Gated Inspect-then-Import Promotion
  summary: Inspect a package first and only import it when the inspection reports no blocking errors.
  description: >-
    Implements a safe promotion gate across the Appian deployment lifecycle by
    chaining inspection and import. The workflow inspects the package, polls the
    inspection to completion, and only proceeds to start the import deployment
    when the inspection reports zero errors. If errors are found the flow stops
    at the gate without importing. After a clean import is started it polls the
    deployment to completion and pulls the deployment log. 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: deploymentApi
  url: ../openapi/appian-deployment-rest-openapi.yml
  type: openapi
workflows:
- workflowId: inspect-then-import
  summary: Gate an import behind a clean inspection and complete the deployment.
  description: >-
    Inspects a package, waits for the inspection to finish, and only imports
    the package when no blocking errors are found, then polls the import to a
    terminal status and retrieves the deployment log.
  inputs:
    type: object
    required:
    - apiKey
    - name
    - packageFileName
    - adminConsoleSettingsFileName
    properties:
      apiKey:
        type: string
        description: API key linked to a service account, sent in the appian-api-key header.
      name:
        type: string
        description: Name of the import deployment, displayed in Appian Designer.
      description:
        type: string
        description: Optional description of the import deployment.
      packageFileName:
        type: string
        description: The deployment package ZIP file content to inspect and import.
      adminConsoleSettingsFileName:
        type: string
        description: The Admin Console settings ZIP file content for inspection and import.
      customizationFileName:
        type: string
        description: Optional import customization properties file content.
  steps:
  - stepId: startInspection
    description: >-
      Create an inspection for the package and settings to detect any blocking
      problems before the import gate.
    operationId: createInspection
    parameters:
    - name: appian-api-key
      in: header
      value: $inputs.apiKey
    requestBody:
      contentType: multipart/form-data
      payload:
        json:
          packageFileName: package.zip
          adminConsoleSettingsFileName: admin-console-settings.zip
          customizationFileName: customization.properties
        packageFileName: $inputs.packageFileName
        adminConsoleSettingsFileName: $inputs.adminConsoleSettingsFileName
        customizationFileName: $inputs.customizationFileName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      inspectionUuid: $response.body#/uuid
  - stepId: pollInspection
    description: >-
      Poll the inspection until it completes, then gate on the error count: a
      clean inspection proceeds to import while errors stop the promotion.
    operationId: getInspectionResults
    parameters:
    - name: appian-api-key
      in: header
      value: $inputs.apiKey
    - name: inspectionUuid
      in: path
      value: $steps.startInspection.outputs.inspectionUuid
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.status != "IN_PROGRESS"
      type: jsonpath
    onFailure:
    - name: retryInspection
      type: retry
      retryAfter: 5
      retryLimit: 30
      criteria:
      - context: $response.body
        condition: $.status == "IN_PROGRESS"
        type: jsonpath
    outputs:
      inspectionStatus: $response.body#/status
      totalErrors: $response.body#/summary/problems/totalErrors
    onSuccess:
    - name: gateBlocked
      type: end
      criteria:
      - context: $response.body
        condition: $.summary.problems.totalErrors > 0
        type: jsonpath
    - name: gatePassed
      type: goto
      stepId: startImport
      criteria:
      - context: $response.body
        condition: $.summary.problems.totalErrors == 0
        type: jsonpath
  - stepId: startImport
    description: >-
      Create the import deployment now that inspection passed with no blocking
      errors, attaching the same package and settings files.
    operationId: createDeployment
    parameters:
    - name: appian-api-key
      in: header
      value: $inputs.apiKey
    - name: Action-Type
      in: header
      value: import
    requestBody:
      contentType: multipart/form-data
      payload:
        json:
          name: $inputs.name
          description: $inputs.description
          packageFileName: package.zip
          adminConsoleSettingsFileName: admin-console-settings.zip
          customizationFileName: customization.properties
        packageFileName: $inputs.packageFileName
        adminConsoleSettingsFileName: $inputs.adminConsoleSettingsFileName
        customizationFileName: $inputs.customizationFileName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deploymentUuid: $response.body#/uuid
      deploymentStatus: $response.body#/status
  - stepId: pollImport
    description: >-
      Poll the import deployment until it leaves the IN_PROGRESS state and
      capture the final import status and object summary.
    operationId: getDeploymentResults
    parameters:
    - name: appian-api-key
      in: header
      value: $inputs.apiKey
    - name: deploymentUuid
      in: path
      value: $steps.startImport.outputs.deploymentUuid
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.status != "IN_PROGRESS"
      type: jsonpath
    onFailure:
    - name: retryImport
      type: retry
      retryAfter: 5
      retryLimit: 60
      criteria:
      - context: $response.body
        condition: $.status == "IN_PROGRESS"
        type: jsonpath
    outputs:
      importStatus: $response.body#/status
      objectSummary: $response.body#/summary/objects
  - stepId: fetchLog
    description: >-
      Retrieve the plain-text deployment log for the completed import to close
      out the promotion with a full record.
    operationId: getDeploymentLog
    parameters:
    - name: appian-api-key
      in: header
      value: $inputs.apiKey
    - name: deploymentUuid
      in: path
      value: $steps.startImport.outputs.deploymentUuid
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      log: $response.body
  outputs:
    inspectionUuid: $steps.startInspection.outputs.inspectionUuid
    deploymentUuid: $steps.startImport.outputs.deploymentUuid
    importStatus: $steps.pollImport.outputs.importStatus
    log: $steps.fetchLog.outputs.log