タイマーコンポーネントを使用すると、プレイブックの実行中に待機時間を設定できます。
機能説明
操作 | 説明 | シナリオ |
set_timer | 待機時間を設定します。 | プレイブックの実行中に特定の待機時間が必要な場合。 |
コンポーネント構成例
このトピックでは、テストプレイブックとしてインポートできるタイマーコンポーネントの各操作のパラメーター構成例を提供します。 可視化フローエディターを使用すると、各操作の構成パラメーターをより直感的に理解してテストし、コンポーネントの機能ロジックと使用方法を簡単に習得できます。 詳細については、「プレイブックのインポート」をご参照ください。
説明
エディターにインポートする前に、サンプルデータを JSON ファイルとして保存できます。
サンプルデータ
{
"cells": [
{
// プレイブック開始ノード。 プレイブックには開始ノードが 1 つだけ必要です。プレイブックの入力データ構成が必要です。
"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": "Playbook start node. A playbook must have one and only one start node, which requires input data configuration for the playbook."
},
"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": "The input of this node is the complete parameter set passed to the script. After running the script, users can view the complete input parameter set of the script through this node, making it easier to debug.",
"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": "Set timer waiting time.",
"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": "The input of this node is the complete parameter set passed to the script. After running the script, users can view the complete input parameter set of the script through this node, making it easier to debug.",
"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 時間)。 |