All Products
Search
Document Center

Security Center:TriggerPlaybook component

Last Updated:Mar 31, 2026

As playbooks grow in complexity, packing every action into a single playbook makes them harder to maintain and reuse. The TriggerPlaybook component lets you split large playbooks into modular sub-playbooks: a main playbook calls a sub-playbook, passes input data to it, and reads back its output — keeping each playbook focused and reusable across workflows.

The component provides two actions that work together:

ActionWhere to use itWhat it does
callSubTaskWithQpsMain playbookCalls a sub-playbook with concurrency limiting; waits synchronously for all executions to complete or time out
setOutputSub-playbookDefines the output data that the main playbook reads back after execution

How they work together: callSubTaskWithQps runs in the main playbook — it triggers the sub-playbook and blocks until all sub-playbook instances finish (or the timeout is reached). setOutput runs in the sub-playbook — it defines what data gets returned to the main playbook. Configure setOutput in the sub-playbook first, then reference its output in the main playbook via callSubTaskWithQps.

Configuration examples

Each example below is a complete JSON file that you can import as a test playbook. After importing, open the playbook in the visualization flow editor to inspect and test the parameter configuration for each action. For import instructions, see Playbook import.

Save the example data as a JSON file before importing.

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

Use callSubTaskWithQps in the main playbook to call a sub-playbook. The main playbook waits synchronously until all sub-playbook executions complete or the timeout is reached before continuing. Each sub-playbook execution generates an execution record. To view records, see View playbook execution records.

Parameters

ParameterDescription
Select playbookThe sub-playbook to call. Lists all playbooks under the current account.
InputInput parameters configured for the start node of the sub-playbook.
OutputOutput parameters configured for the start node of the sub-playbook.

Advanced configuration

ParameterDescriptionDefaultMaximum
maxTasksMaximum number of concurrent sub-playbook executions. Default: 20. If set to 0 or below, the default of 20 applies.2050
waitMaxTimeOneTaskMaximum wait time for a single sub-playbook execution, in seconds.43200 (12 hours)86400 (1 day)
waitMaxTimeMaximum wait time for all sub-playbook executions combined, in seconds.43200 (12 hours)86400 (1 day)

How concurrency limiting works

maxTasks controls how many sub-playbook instances run simultaneously. When the number of calls exceeds maxTasks, excess calls queue and start as running instances complete.

For example, with maxTasks set to 20 (the default) and 100 calls to make: the first 20 start immediately, and the remaining 80 are queued. As each of the first 20 finishes, a queued call starts — continuing until all 100 have run.

setOutput action

Use setOutput in the sub-playbook to define what data the main playbook reads back after execution completes.

Parameters

  • The output parameters available here are those configured in the input and output parameters section of the sub-playbook's start node. For start node configuration, see Start/End.

  • Parameter values support constants, expressions, output values from preceding nodes, and more. For details, see Component parameters and node execution flow.