وثائق بوابة القرار

تقييم بوابة حتمي وقابل لإعادة التشغيل مع قرارات قابلة للتدقيق.

وثائق Asset Core

حالة السيناريو

احصل على لقطة تشغيل للقراءة فقط وملخص آمن دون تغيير الحالة.

ملاحظات رئيسية

  • استخدم لاستطلاع الرأي أو حالة واجهة المستخدم؛ لا يقوم بتقييم البوابات.
  • تتجاهل الملخصات الآمنة قيم الأدلة وقد تتضمن تلميحات لإعادة المحاولة.
  • يُرجع معرفات الحزم الصادرة للمساعدة في تتبع الإفصاحات.

مدخلات

  • طلب (مطلوب): حمولة طلب الحالة.
  • scenario_id (required): معرف السيناريو.

مخطط الإدخال

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "request": {
      "additionalProperties": false,
      "description": "Status request payload.",
      "properties": {
        "correlation_id": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "description": "Correlation identifier.",
              "type": "string"
            }
          ]
        },
        "namespace_id": {
          "description": "Namespace identifier.",
          "minimum": 1,
          "type": "integer"
        },
        "requested_at": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "const": "unix_millis"
                },
                "value": {
                  "type": "integer"
                }
              },
              "required": [
                "kind",
                "value"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "const": "logical"
                },
                "value": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "kind",
                "value"
              ],
              "type": "object"
            }
          ]
        },
        "run_id": {
          "description": "Run identifier.",
          "type": "string"
        },
        "tenant_id": {
          "description": "Tenant identifier.",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "tenant_id",
        "namespace_id",
        "run_id",
        "requested_at"
      ],
      "type": "object"
    },
    "scenario_id": {
      "description": "Scenario identifier.",
      "type": "string"
    }
  },
  "required": [
    "scenario_id",
    "request"
  ],
  "type": "object"
}

المخرجات

  • current_stage_id (required): معرف المرحلة الحالية.
  • issued_packet_ids (required): النوع: array.
  • last_decision (مطلوب): واحدة من نسختين من المخطط.
  • namespace_id (اختياري): معرف المساحة الاسمية.
  • run_id (مطلوب): معرف التشغيل.
  • safe_summary (مطلوب): واحدة من نسختين من المخطط.
  • scenario_id (required): معرف السيناريو.
  • الحالة (مطلوب): النوع: string.

مخطط الإخراج

{
  "additionalProperties": false,
  "properties": {
    "current_stage_id": {
      "description": "Current stage identifier.",
      "type": "string"
    },
    "issued_packet_ids": {
      "items": {
        "description": "Packet identifier.",
        "type": "string"
      },
      "type": "array"
    },
    "last_decision": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "additionalProperties": false,
          "properties": {
            "correlation_id": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "description": "Correlation identifier.",
                  "type": "string"
                }
              ]
            },
            "decided_at": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "kind": {
                      "const": "unix_millis"
                    },
                    "value": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "kind": {
                      "const": "logical"
                    },
                    "value": {
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                }
              ]
            },
            "decision_id": {
              "description": "Decision identifier.",
              "type": "string"
            },
            "outcome": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "kind": {
                      "const": "start"
                    },
                    "stage_id": {
                      "description": "Initial stage identifier.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "stage_id"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "kind": {
                      "const": "complete"
                    },
                    "stage_id": {
                      "description": "Terminal stage identifier.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "stage_id"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "from_stage": {
                      "description": "Previous stage identifier.",
                      "type": "string"
                    },
                    "kind": {
                      "const": "advance"
                    },
                    "timeout": {
                      "type": "boolean"
                    },
                    "to_stage": {
                      "description": "Next stage identifier.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "from_stage",
                    "to_stage",
                    "timeout"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "kind": {
                      "const": "hold"
                    },
                    "summary": {
                      "additionalProperties": false,
                      "properties": {
                        "policy_tags": {
                          "description": "Policy tags applied to the summary.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "retry_hint": {
                          "oneOf": [
                            {
                              "type": "null"
                            },
                            {
                              "description": "Optional retry hint.",
                              "type": "string"
                            }
                          ]
                        },
                        "status": {
                          "description": "Summary status.",
                          "type": "string"
                        },
                        "unmet_gates": {
                          "items": {
                            "description": "Gate identifier.",
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "status",
                        "unmet_gates",
                        "retry_hint",
                        "policy_tags"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "kind",
                    "summary"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "kind": {
                      "const": "fail"
                    },
                    "reason": {
                      "description": "Failure reason.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "reason"
                  ],
                  "type": "object"
                }
              ]
            },
            "seq": {
              "minimum": 0,
              "type": "integer"
            },
            "stage_id": {
              "description": "Stage identifier.",
              "type": "string"
            },
            "trigger_id": {
              "description": "Trigger identifier.",
              "type": "string"
            }
          },
          "required": [
            "decision_id",
            "seq",
            "trigger_id",
            "stage_id",
            "decided_at",
            "outcome",
            "correlation_id"
          ],
          "type": "object"
        }
      ]
    },
    "namespace_id": {
      "description": "Namespace identifier.",
      "minimum": 1,
      "type": "integer"
    },
    "run_id": {
      "description": "Run identifier.",
      "type": "string"
    },
    "safe_summary": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "additionalProperties": false,
          "properties": {
            "policy_tags": {
              "description": "Policy tags applied to the summary.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "retry_hint": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "description": "Optional retry hint.",
                  "type": "string"
                }
              ]
            },
            "status": {
              "description": "Summary status.",
              "type": "string"
            },
            "unmet_gates": {
              "items": {
                "description": "Gate identifier.",
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "status",
            "unmet_gates",
            "retry_hint",
            "policy_tags"
          ],
          "type": "object"
        }
      ]
    },
    "scenario_id": {
      "description": "Scenario identifier.",
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "completed",
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "run_id",
    "scenario_id",
    "current_stage_id",
    "status",
    "last_decision",
    "issued_packet_ids",
    "safe_summary"
  ],
  "type": "object"
}

أمثلة

استعلام حالة التشغيل دون التقدم في التشغيل.

مدخل:

{
  "request": {
    "correlation_id": null,
    "namespace_id": 1,
    "requested_at": {
      "kind": "unix_millis",
      "value": 1710000000000
    },
    "run_id": "run-0001",
    "tenant_id": 1
  },
  "scenario_id": "example-scenario"
}

Output:

{
  "current_stage_id": "main",
  "issued_packet_ids": [],
  "last_decision": null,
  "run_id": "run-0001",
  "safe_summary": null,
  "scenario_id": "example-scenario",
  "status": "active"
}