导出工作流定义-GetSFWorkflowTemplate

导出工作流定义

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口No
WorkflowIdstring被导出工作流的IdYes
WorkflowVersionint被导出工作流的版本号。取值范围:WorkflowVersion >= 1;默认会获取发布版本对应的workflow;超过最大版本会返回错误No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
WorkflowIdstring导出工作流的IdYes
Versionint导出工作流的版本号Yes
Workflowobject工作流定义,详细信息见工作流对象定义Yes
Messagestring返回消息No

WorkflowTemplate

Parameter nameTypeDescriptionRequired
Inputarray工作流的输入,详细信息见ParamNo
Outputarray工作流的输出,详细信息见ParamNo
Activitesarray工作流的Activities,详细信息见工作流的Activity定义No

ActivityTemplate

Parameter nameTypeDescriptionRequired
NamestringActivity的名字No
TypestringActivity的类型No
RetryTimesstringActivity的重试次数No
TimeoutstringActivity的超时时间No
Nextstring下一个Activity的名字No
InputobjectActivity的输入No
OutputarrayActivity的输出,详见ParamNo

Param

Parameter nameTypeDescriptionRequired
Namestring参数名称No
Typestring参数类型No
Valuestring参数值No

Request Example

https://api.ucloud.cn/?Action=GetSFWorkflowTemplate 
&Region=cn-bj2
&ProjectId=pAZhEbkU
&WorkflowId=fdhoGtKK
&WorkflowVersion=1

Response Example

{
    "Action": "GetSFWorkflowTemplateResponse",
    "Message": "success",
    "RetCode": 0,
    "Version": 1,
    "Workflow": {
        "Input": [
            {
                "Name": "UserID",
                "Type": "INT64",
                "Value": "",
                "Constrain": null
            },
            {
                "Name": "UserName",
                "Type": "STRING",
                "Value": "",
                "Constrain": null
            }
        ],
        "Output": [],
        "Activities": [
            {
                "Name": "start",
                "Type": "StartActivity",
                "Input": null,
                "Output": null,
                "Next": "step934",
                "Timeout": 600000,
                "RetryTimes": 0
            },
            {
                "Name": "end",
                "Type": "EndActivity",
                "Input": null,
                "Output": null,
                "Next": "",
                "Timeout": 600000,
                "RetryTimes": 0
            },
            {
                "Name": "step934",
                "Type": "HttpActivity",
                "Input": {
                    "body": {
                        "UserID": "${workflow.input.UserID}",
                        "UserName": "${workflow.input.UserName}"
                    },
                    "header": {
                        "ContentType": "application/json"
                    },
                    "isAsync": false,
                    "method": "GET",
                    "query": {
                        "Action": "VerifyUser"
                    },
                    "retrytimes": 0,
                    "timeout": 0,
                    "url": "http://52.165.220.33/api/json/est/now"
                },
                "Output": null,
                "Next": "end",
                "Timeout": 600000,
                "RetryTimes": 0
            }
        ]
    },
    "WorkflowId": "craig-qq4nqG.import_case_low"
}