The TriggerPlaybook component primarily provides functionality to call sub-playbooks.
Feature description
Action | Description | Scenarios |
setOutput | Defines the output of the playbook. | Used when a sub-playbook is called by a main playbook, and the main playbook needs to obtain the output content from the sub-playbook. |
callSubTaskWithQps | Calls a sub-playbook (with QPS limit). | Used in the main playbook when calling an external sub-playbook. |
Configuration examples
This topic provides parameter configuration examples for each action of the TriggerPlaybook component, which you can import as test playbooks. Through the visualization flow editor, you can more intuitively understand and test the configuration parameters of each action, and easily master the functional logic and usage of the component. For the procedure, see Playbook import.
First save the example data as a JSON file.
setOutput example
{
"cells": [
{
"position": {
"x": -440,
"y": -170
},
"size": {
"width": 36,
"height": 36
},
"attrs": {
"body": {
"fill": "white",
"strokeOpacity": 0.95,
"stroke": "black",
"strokeWidth": 2
},
"label": {
"text": "start",
"fontSize": 12,
"refX": 0.5,
"refY": "100%",
"refY2": 4,
"textAnchor": "middle",
"textVerticalAnchor": "top"
}
},
"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
},
{
"shape": "custom-edge",
"zIndex": 1,
"id": "5293c3f9-e1c9-4a49-b0eb-635067dc67e8",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "58d87b7d-28d9-4f0e-b135-4adc4f1a70e4"
},
"target": {
"cell": "ebdc953c-2902-4133-abfd-9fc5ad707b21"
},
"vertices": []
},
{
"position": {
"x": 170,
"y": -170
},
"size": {
"width": 36,
"height": 36
},
"attrs": {
"body": {
"fill": "white",
"strokeOpacity": 0.95,
"stroke": "black",
"strokeWidth": 2
},
"path": {
"r": 12,
"refX": "50%",
"refY": "50%",
"fill": "black",
"strokeOpacity": 0.95,
"stroke": "black",
"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
},
{
"position": {
"x": -297,
"y": -185
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "ebdc953c-2902-4133-abfd-9fc5ad707b21",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "DataFormat",
"valueData": {
"outputFields": "[{\"fieldName\":\"name\",\"fieldValue\":\"${event.name}_Sub\"},{\"fieldName\":\"age\",\"fieldValue\":\"${event.age}_Sub\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745549020&OSSAccessKeyId=STS.NVgz************&Signature=HtvRQuo%2BgDw7egOVmZYuihj3Z9Q%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5XSMYv%2FoLYV1pKpSULpgXcPZulDnJOc0Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb400mTGGK0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bo1K1xOgUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU4vuWVwMytAXxqAASmDGMrrsc17A02zxAGygdO5NYPui1jn%2BSY7C6gPM7rbo6PMdEFZX2yrNrPIWiL%2FZl3CXTr9B84IhYB%2BqtLWbOidAj9UOvH7iCjL%2B%2FWVElkcfZzL6gT%2B0Ech6QH3PTlC6B%2FT4e69%2FsLD%2BogKYS8Ziv%2F%2Fbd8%2BlrcMu5FNBBFigttDIAA%3D",
"description": "Generate new data",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "formatdata"
},
"isNode": true
},
{
"shape": "custom-edge",
"zIndex": 1,
"id": "5ae3f1ac-4d5b-433b-a9e7-725ea53f36db",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "ebdc953c-2902-4133-abfd-9fc5ad707b21"
},
"target": {
"cell": "025181c9-9678-45a1-bbd9-0a7fa3eb2b7e"
},
"vertices": []
},
{
"position": {
"x": -60,
"y": -190
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "025181c9-9678-45a1-bbd9-0a7fa3eb2b7e",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "TriggerPlaybook_1",
"valueData": {
"infos": "[{\"fieldName\":\"name\",\"fieldValue\":\"${DataFormat.datalist.*.name}\"},{\"fieldName\":\"age\",\"fieldValue\":\"${DataFormat.datalist.*.age}\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1666576284868_TriggerPlaybook_logo.svg?Expires=1745549020&OSSAccessKeyId=STS.NVgz************&Signature=%2FjtIi%2Btlp%2FH9PxUne6LeG4lS%2B2Y%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5XSMYv%2FoLYV1pKpSULpgXcPZulDnJOc0Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb400mTGGK0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bo1K1xOgUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU4vuWVwMytAXxqAASmDGMrrsc17A02zxAGygdO5NYPui1jn%2BSY7C6gPM7rbo6PMdEFZX2yrNrPIWiL%2FZl3CXTr9B84IhYB%2BqtLWbOidAj9UOvH7iCjL%2B%2FWVElkcfZzL6gT%2B0Ech6QH3PTlC6B%2FT4e69%2FsLD%2BogKYS8Ziv%2F%2Fbd8%2BlrcMu5FNBBFigttDIAA%3D",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "TriggerPlaybook",
"actionName": "setOutput"
},
"isNode": true
},
{
"shape": "custom-edge",
"zIndex": 1,
"id": "4f5dfe7c-751a-405c-a9b4-c0ff7c083ad9",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "025181c9-9678-45a1-bbd9-0a7fa3eb2b7e"
},
"target": {
"cell": "317dd1be-2d20-460e-977e-1fc936ffb583"
},
"vertices": []
}
]
}callSubTaskWithQps example
{
"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": "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
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "5293c3f9-e1c9-4a49-b0eb-635067dc67e8",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "58d87b7d-28d9-4f0e-b135-4adc4f1a70e4"
},
"target": {
"cell": "bf7d41ee-bd07-4b57-a3bc-02b50603c4f5"
},
"vertices": [
],
"visible": true,
"router": {
"name": "manhattan",
"args": {
"padding": 5,
"excludeHiddenNodes": true,
"excludeNodes": [
"clone_node_id"
]
}
}
},
{
"position": {
"x": 240,
"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",
"cascaderValue": [
{
"label": "DataFormat_1",
"value": "${DataFormat_1}",
"children": [
]
},
{
"label": "TriggerPlaybook",
"value": "${TriggerPlaybook}",
"children": [
]
}
]
},
"markup": [
{
"tagName": "circle",
"selector": "body"
},
{
"tagName": "circle",
"selector": "path"
},
{
"tagName": "text",
"selector": "label"
}
],
"isNode": true
},
{
"position": {
"x": -144,
"y": -185
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "bf7d41ee-bd07-4b57-a3bc-02b50603c4f5",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "TriggerPlaybook",
"valueData": {
"event": "[{\"fieldName\":\"name\",\"fieldValue\":\"TriggerPlaybook\"},{\"fieldName\":\"age\",\"fieldValue\":\"18\"},{\"fieldName\":\"ip\",\"fieldValue\":\"192.168.10.1\"},{\"fieldName\":\"scope\",\"fieldValue\":\"1766185894104675\"}]",
"tenantId": "1359316744907524",
"taskName": "system_aliyun_waf_batch_whitelist_book"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1666576284868_TriggerPlaybook_logo.svg?Expires=1745548802&OSSAccessKeyId=STS.NVL1uKAoNQbuFQBTpRHpZMCaN&Signature=w22i0vzkKODDUY9xNAwfril0uTo%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X5es%2F%2FrLBv5qCeRHfzsHAHRP92oobKrDz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4yMGWW6K0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bs5SwZtdAf0rM946UoJvc3YDI5hWbc8mJsTnhSSTAEIv%2By8ptqoFOtH7DkLTHWR7hCtv2305QYbPzMytAXxqAAa%2Bmv7bOZIL67fKJSGOwNGVYwDkNYp2zvM3zoahdc4lQ0oeSmmNoFIvUzRWck5dqsTWQ0D%2BJzP45DavayQJlYdzomPe%2B1HdN%2BLEIuOGaP202XYPIW6ZE2GI8R2Vq6WYhXZEaMB5PmDGO59NwFAhuZCkhixpwmkFhiuNhw6P3XmoTIAA%3D",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "TriggerPlaybook",
"actionName": "callSubTaskWithQps",
"status": "success",
"cascaderValue": [
]
},
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "439e42d8-8ff8-4b12-9c8e-32e16a4fb9db",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "bf7d41ee-bd07-4b57-a3bc-02b50603c4f5"
},
"target": {
"cell": "317dd1be-2d20-460e-977e-1fc936ffb583"
},
"vertices": [
],
"visible": true,
"router": {
"name": "manhattan",
"args": {
"padding": 5,
"excludeHiddenNodes": true,
"excludeNodes": [
"clone_node_id"
]
}
}
}
]
}callSubTaskWithQps
After a sub-playbook is executed, an execution record is generated. To view the record, see View playbook execution records.
Parameter description
Parameter | Description | |
Select playbook | All playbooks under the current account. | |
Input | Input parameters configured for the start node of the sub-playbook. | |
Output | Output parameters configured for the start node of the sub-playbook. | |
Advanced configuration | maxTasks | Maximum concurrency for sub-playbook execution. If less than or equal to 0, the default limit (20) is used. The configurable upper limit is 50. For example: If you need to call a sub-playbook 100 times using the default limit, it will not execute all 100 times simultaneously. Instead, it will first execute 20 times, with the remaining 80 waiting. As tasks from the initial 20 complete, new tasks from the remaining 80 will be started, creating a rate-limiting effect. |
waitMaxTimeOneTask | Maximum waiting time for a single sub-playbook execution, in seconds. The default is 43200 (12 hours), with a maximum of 86400 (1 day). | |
waitMaxTime | Maximum waiting time for all playbooks, in seconds. The default is 43200 (12 hours), with a maximum of 86400 (1 day). | |
SetOutput action
Defines the output parameters and parameter values of the playbook.
Parameter description
The output parameters configured for the playbook will be used. These need to be configured in the input and output parameters section of the start node of the playbook. For start node parameter settings, see Start/End.
Parameter values support constants, expressions, output values from preceding nodes, and more. For details, see Component parameters and node execution flow.