開始一個流程的執行。
介面說明
介面說明
流程必須已經存在,當前僅支援 Standard 執行模式的流程。
如果沒有指定執行名稱,則服務會自動產生執行名稱並開始執行。
如果有同名執行進行中,則不會開始新的執行,直接返回進行中中的同名執行。
如果同名執行已經結束(成功或者失敗),則會返回
ExecutionAlreadyExists。如果沒有同名執行,則開始新的執行。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
fnf:StartExecution |
update |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| FlowName |
string |
是 |
開始執行的流程名稱。 |
my_flow_name |
| ExecutionName |
string |
否 |
執行名稱,在同一流程內唯一。取值說明如下:
|
my_exec_name |
| Input |
string |
否 |
執行的輸入,為 JSON 對象格式。 |
{"key":"value"} |
| CallbackFnFTaskToken |
string |
否 |
流程執行結束後回調 TaskToken 相關任務。 |
12 |
| Qualifier |
string |
否 |
指定流程版本或別名 |
1 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回資料。 |
||
| Status |
string |
執行狀態。取值說明如下:
|
Succeeded |
| StoppedTime |
string |
執行停止時間。 |
2019-01-01T01:01:01.001Z |
| RequestId |
string |
請求 ID。 |
testRequestId |
| StartedTime |
string |
執行開始時間。 |
2019-01-01T01:01:01.001Z |
| FlowDefinition |
string |
執行的流程定義。 |
舊版: "type: flow\nversion: v1\nname: my_flow_name\nsteps:\n - type: pass\n name: mypass" 新版: "Type: StateMachine\nSpecVersion: v1\nName: my_flow_name\nStartAt: my_state\nStates:\n - Type: Pass\n Name: my_state\n End: true" |
| Output |
string |
執行的輸出,為 JSON 對象格式。 |
{"key":"value"} |
| FlowName |
string |
流程名稱。 |
my_flow_name |
| Name |
string |
執行名稱。 |
my_exec_name |
| Input |
string |
執行的輸入,為 JSON 對象格式。 |
{"key":"value"} |
樣本
正常返回樣本
JSON格式
{
"Status": "Succeeded",
"StoppedTime": "2019-01-01T01:01:01.001Z",
"RequestId": "testRequestId",
"StartedTime": "2019-01-01T01:01:01.001Z",
"FlowDefinition": "舊版:\n\"type: flow\\nversion: v1\\nname: my_flow_name\\nsteps:\\n - type: pass\\n name: mypass\"\n\n新版:\n\"Type: StateMachine\\nSpecVersion: v1\\nName: my_flow_name\\nStartAt: my_state\\nStates:\\n - Type: Pass\\n Name: my_state\\n End: true\"",
"Output": "{\"key\":\"value\"}",
"FlowName": "my_flow_name",
"Name": "my_exec_name",
"Input": "{\"key\":\"value\"}"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | ActionNotSupported | The requested API operation '%s' is incorrect. Please check. | |
| 400 | APIVersionNotSupported | The requested API version '%s' is not supported yet. Please check. | |
| 400 | EntityTooLarge | The payload size exceeds maximum allowed size (%s bytes). | 請求訊息體過大。 |
| 400 | ExecutionAlreadyExists | Execution %s for flow %s already exists. | 對應流程下已存在同名執行。 |
| 400 | InvalidArgument | Parameter error. | 請求參數錯誤。具體內容請參考實際錯誤資訊。 |
| 400 | MissingRequiredHeader | The HTTP header '%s' must be specified. | 請求所需參數缺失。具體內容請參考實際錯誤資訊。 |
| 400 | MissingRequiredParams | The HTTP query '%s' must be specified. | 請求所需參數缺失。具體內容請參考實際錯誤資訊。 |
| 500 | InternalServerError | An internal error has occurred. Please retry. | 伺服器內部錯誤。請稍後重試。 |
| 403 | AccessDenied | The resources doesn't belong to you. | |
| 403 | InvalidAccessKeyID | The AccessKey ID %s is invalid. | AccessKey ID無效。 |
| 403 | RequestTimeTooSkewed | The difference between the request time %s and the current time %s is too large. | 您的請求時間不正確,該請求已被識別為無效。請參考通用參數一節。 |
| 403 | SignatureNotMatch | The request signature we calculated does not match the signature you provided. Check your access key and signing method. | 您發起請求的簽名與我們計算不一致,請檢查您的簽名演算法及AccessKey Secret。 |
| 404 | FlowNotExists | Flow %s does not exist. | 所請求資源不存在,請確保流程已建立。 |
| 415 | UnsupportedMediaType | The content type must be "application/json". | 請求訊息體類型錯誤。 |
| 429 | ResourceThrottled | The request is throttled. Please try again later. | 因某些原因系統流量已達瓶頸。請稍後重試。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。