Express Quality Gate Check

Express quality gate check for incoming components. Validates the manufacturing order traceability and immediately runs dimensional and surface acceptance inspection, returning a real-time pass or hold decision to the production line.
{
  "Comment": "Express Quality Gate Check - rapid pre-qualification before entering full manufacturing pipeline",
  "StartAt": "SetQualityGateContext",
  "States": {
    "SetQualityGateContext": {
      "Type": "Pass",
      "Parameters": {
        "gateCheckId.$": "States.Format('QG-{}', $$.Execution.Name)",
        "vehicleType.$": "$.vehicleType",
        "orderId.$": "$.orderId",
        "originalOrder.$": "$"
      },
      "ResultPath": "$.qualityGateContext",
      "Next": "ValidateManufacturingOrder"
    },
    "ValidateManufacturingOrder": {
      "Type": "Task",
      "Resource": "${ValidateManufacturingOrderFunctionArn}",
      "Retry": [
        {
          "ErrorEquals": [
            "States.ALL"
          ],
          "IntervalSeconds": 1,
          "MaxAttempts": 2
        }
      ],
      "Catch": [
        {
          "ErrorEquals": [
            "States.ALL"
          ],
          "Next": "QualityGateFailed"
        }
      ],
      "Next": "InspectComponents"
    },
    "InspectComponents": {
      "Type": "Task",
      "Resource": "${InspectComponentsFunctionArn}",
      "Retry": [
        {
          "ErrorEquals": [
            "States.ALL"
          ],
          "IntervalSeconds": 1,
          "MaxAttempts": 2
        }
      ],
      "Catch": [
        {
          "ErrorEquals": [
            "States.ALL"
          ],
          "Next": "QualityGateFailed"
        }
      ],
      "Next": "WaitForQualityDecision"
    },
    "WaitForQualityDecision": {
      "Type": "Wait",
      "Seconds": 2,
      "Next": "EvaluateQualityGate"
    },
    "EvaluateQualityGate": {
      "Type": "Choice",
      "Choices": [
        {
          "And": [
            {
              "Variable": "$.orderStatus",
              "StringEquals": "VALIDATED"
            },
            {
              "Variable": "$.inspectionStatus",
              "StringEquals": "PASSED"
            }
          ],
          "Next": "QualityGatePassed"
        },
        {
          "Variable": "$.inspectionStatus",
          "StringEquals": "FAILED",
          "Next": "QualityGateHold"
        }
      ],
      "Default": "QualityGateFailed"
    },
    "QualityGatePassed": {
      "Type": "Succeed"
    },
    "QualityGateHold": {
      "Type": "Succeed"
    },
    "QualityGateFailed": {
      "Type": "Fail",
      "Error": "QualityGateRejected",
      "Cause": "Vehicle manufacturing order did not pass quality gate checks"
    }
  }
}
JSON
Expand
100%

Aerospace teams can use patterns like this to build reliable, compliant, and scalable automation for payment systems and can test and refine these flows locally with Thrubit to reduce cloud cost and speed up iteration.

Free Trial