Timer组件主要功能为设置剧本执行等待时间。
功能描述
动作 | 描述 | 使用场景 |
set_timer | 设置等待时间。 | 剧本执行过程中需要等待一定时间。 |
组件配置示例
本文提供了Timer组件各动作的参数配置示例,您可将其作为测试剧本导入。通过可视化流程编辑器,能更直观地了解和测试各动作的配置参数,轻松掌握组件的功能逻辑与使用方式。操作步骤可参考剧本导入。
说明
请先将示例数据保存为JSON文件,再导入编辑器中。
示例数据
{
"cells": [
{
"position": {
"x": -440,
"y": -170
},
"size": {
"width": 36,
"height": 36
},
"attrs": {
"body": {
"fill": "white",
"strokeOpacity": 0.95,
"stroke": "#63ba4d",
"strokeWidth": 2
},
"label": {
"text": "start",
"fontSize": 12,
"refX": 0.5,
"refY": "100%",
"refY2": 4,
"textAnchor": "middle",
"textVerticalAnchor": "top"
},
"path": {
"stroke": "#63ba4d"
}
},
"visible": true,
"shape": "circle",
"id": "58d87b7d-28d9-4f0e-b135-4adc4f1a70e4",
"zIndex": 1,
"data": {
"nodeType": "startEvent",
"appType": "basic",
"nodeName": "start",
"icon": "icon-circle",
"description": "剧本开始节点,一个剧本必须有且仅有一个开始节点,需为剧本配置输入数据。"
},
"markup": [
{
"tagName": "circle",
"selector": "body"
},
{
"tagName": "text",
"selector": "label"
}
],
"isNode": true
},
{
"position": {
"x": -309,
"y": -185
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "7579d96d-9ec2-4c60-8c8b-ee68df491794",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "configuration",
"valueData": {
"inputData": "${input}"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745654235&OSSAccessKeyId=STS.NX3h************&Signature=5V9yasSaH73dWm7f5WFt%2FCEOjuo%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5uGI9DFq7R17ZOId1TJlFIUbu5CgP2chjz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4wdfXzKK0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bg1enxpcUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU7BZbc1MytAXxqAAW%2F6C5OU%2B1MerwMifrN5cHuF%2FoTca2zP0lbhpkSha%2BCD0N7X63S8%2BzORduE8fJ3gGyxZF73olgINqElDISvZYDqWoP%2BTLMYmdNx9UBYCfRF43%2FL9gBt5Ml%2Fv%2FmvXPx8bHLUZie8Xu15tsjsMoo7Sg3eyxdA%2BnvWJPtGYQXncQFb0IAA%3D",
"description": "该节点的输入是传递给脚本的全部参数集合。运行脚本后,用户可以通过此节点查看脚本的全部输入参数集合,从而便于调试。",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "convertToJSON",
"cascaderValue": [
],
"status": "success"
},
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "5293c3f9-e1c9-4a49-b0eb-635067dc67e8",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"isRequired": true,
"icon": "icon-upper-right-arrow"
},
"isNode": false,
"source": {
"cell": "58d87b7d-28d9-4f0e-b135-4adc4f1a70e4"
},
"target": {
"cell": "7579d96d-9ec2-4c60-8c8b-ee68df491794"
}
},
{
"position": {
"x": 300,
"y": -170
},
"size": {
"width": 36,
"height": 36
},
"attrs": {
"body": {
"fill": "white",
"strokeOpacity": 0.95,
"stroke": "#63ba4d",
"strokeWidth": 2
},
"path": {
"r": 12,
"refX": "50%",
"refY": "50%",
"fill": "#63ba4d",
"strokeOpacity": 0.95,
"stroke": "#63ba4d",
"strokeWidth": 4
},
"label": {
"text": "end",
"fontSize": 12,
"refX": 0.5,
"refY": "100%",
"refY2": 4,
"textAnchor": "middle",
"textVerticalAnchor": "top"
}
},
"visible": true,
"shape": "circle",
"id": "317dd1be-2d20-460e-977e-1fc936ffb583",
"zIndex": 1,
"data": {
"nodeType": "endEvent",
"appType": "basic",
"nodeName": "end",
"icon": "icon-radio-off-full",
"description": "end"
},
"markup": [
{
"tagName": "circle",
"selector": "body"
},
{
"tagName": "circle",
"selector": "path"
},
{
"tagName": "text",
"selector": "label"
}
],
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "e38fa6ee-cc87-4889-9bf1-9ceb12c5a169",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"isRequired": true,
"icon": "icon-upper-right-arrow"
},
"isNode": false,
"source": {
"cell": "7579d96d-9ec2-4c60-8c8b-ee68df491794"
},
"target": {
"cell": "4c63291d-7e40-4bdc-9491-df19c4bd663b"
},
"visible": true,
"router": {
"name": "manhattan",
"args": {
"padding": 5,
"excludeHiddenNodes": true,
"excludeNodes": [
"clone_node_id"
]
}
},
"vertices": [
]
},
{
"position": {
"x": -96,
"y": -185
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"attrs": {
"label": {
"text": "Timer_1"
}
},
"shape": "activity",
"id": "4c63291d-7e40-4bdc-9491-df19c4bd663b",
"data": {
"componentName": "Timer",
"appType": "component",
"nodeType": "action",
"icon": "https://img.alicdn.com/tfs/TB1rdfSrZfpK1RjSZFOXXa6nFXa-200-200.svg",
"ownType": "sys",
"zIndex": 1,
"tenantId": "baba",
"customInput": false,
"description": "设置定时等待时间。",
"id": 0,
"name": "set_timer",
"operateType": "general",
"output": [
{
"dataType": "String",
"name": "message"
},
{
"dataType": "Boolean",
"name": "status"
}
],
"parameters": [
{
"dataType": "Long",
"defaultValue": "",
"description": "second",
"name": "timerInterval",
"needCascader": false,
"required": true
}
],
"riskLevel": 2,
"nodeName": "Timer_1",
"actionName": "set_timer",
"actionDisplayName": "set_timer",
"cascaderValue": [
{
"label": "configuration",
"value": "${configuration}",
"children": [
{
"label": "configuration.datalist.*.triggerType",
"name": "configuration.datalist.*.triggerType",
"value": "${configuration.datalist.*.triggerType}"
},
{
"label": "configuration.datalist.*._req_uuid",
"name": "configuration.datalist.*._req_uuid",
"value": "${configuration.datalist.*._req_uuid}"
},
{
"label": "configuration.status",
"name": "configuration.status",
"value": "${configuration.status}"
},
{
"label": "configuration.datalist.*._tenant_id",
"name": "configuration.datalist.*._tenant_id",
"value": "${configuration.datalist.*._tenant_id}"
},
{
"label": "configuration.total_data",
"name": "configuration.total_data",
"value": "${configuration.total_data}"
},
{
"label": "configuration.datalist.*._trigger_user",
"name": "configuration.datalist.*._trigger_user",
"value": "${configuration.datalist.*._trigger_user}"
},
{
"label": "configuration.datalist.*.triggerUser",
"name": "configuration.datalist.*.triggerUser",
"value": "${configuration.datalist.*.triggerUser}"
},
{
"label": "configuration.datalist.*._domain_id",
"name": "configuration.datalist.*._domain_id",
"value": "${configuration.datalist.*._domain_id}"
},
{
"label": "configuration.total_data_with_dup",
"name": "configuration.total_data_with_dup",
"value": "${configuration.total_data_with_dup}"
},
{
"label": "configuration.total_exe_successful",
"name": "configuration.total_exe_successful",
"value": "${configuration.total_exe_successful}"
},
{
"label": "configuration.total_data_successful",
"name": "configuration.total_data_successful",
"value": "${configuration.total_data_successful}"
},
{
"label": "configuration.total_exe",
"name": "configuration.total_exe",
"value": "${configuration.total_exe}"
},
{
"label": "configuration.datalist.*._region_id",
"name": "configuration.datalist.*._region_id",
"value": "${configuration.datalist.*._region_id}"
}
]
}
],
"valueData": {
"timerInterval": "30"
},
"status": "success"
},
"zIndex": 1
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "f069419a-3504-4e82-8e01-52b69ea6eb11",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"isRequired": true,
"icon": "icon-upper-right-arrow"
},
"isNode": false,
"visible": true,
"router": {
"name": "manhattan",
"args": {
"padding": 5,
"excludeHiddenNodes": true,
"excludeNodes": [
"clone_node_id"
]
}
},
"source": {
"cell": "4c63291d-7e40-4bdc-9491-df19c4bd663b"
},
"target": {
"cell": "47a385d5-4a60-4c1d-b2ab-5d0a630d5021"
},
"vertices": [
]
},
{
"position": {
"x": 103,
"y": -185
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"attrs": {
"label": {
"text": "DataFormat_2"
}
},
"shape": "activity",
"id": "47a385d5-4a60-4c1d-b2ab-5d0a630d5021",
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "DataFormat_2",
"valueData": {
"inputData": "${input}"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745654235&OSSAccessKeyId=STS.NX3h************&Signature=5V9yasSaH73dWm7f5WFt%2FCEOjuo%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5uGI9DFq7R17ZOId1TJlFIUbu5CgP2chjz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4wdfXzKK0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bg1enxpcUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU7BZbc1MytAXxqAAW%2F6C5OU%2B1MerwMifrN5cHuF%2FoTca2zP0lbhpkSha%2BCD0N7X63S8%2BzORduE8fJ3gGyxZF73olgINqElDISvZYDqWoP%2BTLMYmdNx9UBYCfRF43%2FL9gBt5Ml%2Fv%2FmvXPx8bHLUZie8Xu15tsjsMoo7Sg3eyxdA%2BnvWJPtGYQXncQFb0IAA%3D",
"description": "该节点的输入是传递给脚本的全部参数集合。运行脚本后,用户可以通过此节点查看脚本的全部输入参数集合,从而便于调试。",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "convertToJSON",
"status": "success"
},
"isNode": true,
"zIndex": 1
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "2abed2e8-c4b4-45bf-8426-d248915c5173",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"isRequired": true,
"icon": "icon-upper-right-arrow"
},
"isNode": false,
"visible": true,
"router": {
"name": "manhattan",
"args": {
"padding": 5,
"excludeHiddenNodes": true,
"excludeNodes": [
"clone_node_id"
]
}
},
"source": {
"cell": "47a385d5-4a60-4c1d-b2ab-5d0a630d5021"
},
"target": {
"cell": "317dd1be-2d20-460e-977e-1fc936ffb583"
},
"vertices": [
]
}
]
}
set_timer动作
参数说明
参数 | 说明 |
timerInterval | 等待时长,单位为秒。最大值限制:7200秒(2小时)。 |
该文章对您有帮助吗?