All Products
Search
Document Center

Security Center:TaskContext component

Last Updated:Oct 29, 2025

The TaskContext component lets you set and query the context of a playbook.

Features

Action

Description

Scenarios

setContext

Sets the context.

Note
  • If the key does not exist, a new key is created.

  • If the key exists, its value is overwritten.

Saves contextual information during playbook execution for later use.

getContext

Queries the context.

Queries saved contextual information.

appendListContext

Appends a value to a list-type context.

Note
  • If the key does not exist, a new list is created.

  • If the key exists, the value is appended to the existing list.

Appends contextual information during playbook execution for later use.

getListContext

Queries a list-type context.

Queries saved list-type contextual information.

Configuration example

This topic provides configuration examples for the actions of the TaskContext component. You can import these examples as a test playbook. In the visualization flow editor, you can use the examples to understand and test the parameters for each action. This makes it easy to learn the component's logic and usage. For more information, see Import a playbook.

Note

Save the sample data as a JSON file before you import the playbook.

Sample data

{
	"cells": [{
		"shape": "custom-edge",
		"attrs": {
			"line": {
				"stroke": "#63ba4d",
				"targetMarker": {
					"stroke": "#63ba4d"
				}
			}
		},
		"zIndex": 1,
		"id": "SequenceFlow_1o0qh3v",
		"data": {
			"isRequired": false,
			"appType": "basic",
			"nodeType": "sequenceFlow",
			"icon": "icon-upper-right-arrow"
		},
		"labels": [],
		"isNode": false,
		"source": {
			"cell": "StartEvent_1"
		},
		"target": {
			"cell": "Action_0xquztz"
		},
		"vertices": []
	}, {
		"position": {
			"x": -5,
			"y": 40
		},
		"size": {
			"width": 137,
			"height": 66
		},
		"view": "react-shape-view",
		"shape": "activity",
		"id": "Action_1sons4h",
		"data": {
			"nodeName": "TaskContext_6",
			"appType": "component",
			"componentName": "TaskContext",
			"nodeType": "action",
			"actionName": "getContext",
			"valueData": {
				"key": "name1"
			},
			"advance": {
				"onError": "stop_cur_flow",
				"rspStatusType": "3",
				"rspStatusThreshold": "0"
			},
			"icon": "https://sophon-gen-cloud-zhangjiakou-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1750301983722_TaskContext_logo.png?Expires=1750405284&OSSAccessKeyId=STS.NX5Y***********8W&Signature=uNBTObExLWAh7J%2FYPX9uw%2BMslV0%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5uAEv7337V53aeSZ1z8tnkmbcdh2paTtTz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4wxlQRGU0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bgxqt0OxsGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU7tn6l7MytAXxqAAQp4DQPgtjJpGipxkBpHLuNcGBShBy0T%2FpykyCMMvjeeh8Njd2uoNr8a5YOQwSurIQBC%2Fdl7%2FLGF1seWmsvRe8rz93egKbfC4VJaqXYns7EtnxWHfeg6lVso34AuucxdMPTZ%2Bzu2Y76yPUhGWYG6RX%2BLU%2FTFWHUtiXium458vUuIIAA%3D",
			"status": "success"
		},
		"zIndex": 1,
		"isNode": true
	}, {
		"position": {
			"x": -467,
			"y": 40
		},
		"size": {
			"width": 137,
			"height": 66
		},
		"view": "react-shape-view",
		"shape": "activity",
		"id": "Action_0geouqf",
		"data": {
			"nodeName": "TaskContext_7",
			"appType": "component",
			"componentName": "TaskContext",
			"nodeType": "action",
			"actionName": "appendListContext",
			"valueData": {
				"value": "jys_${event._req_uuid}_1",
				"ttl": "86400",
				"key": "nameList1"
			},
			"advance": {
				"onError": "stop_cur_flow",
				"rspStatusType": "3",
				"description": "Appends a value to a list-type context. If the key does not exist, a new list is created with the current value. If the key exists, the value is appended to the existing list.",
				"rspStatusThreshold": "0"
			},
			"icon": "https://sophon-gen-cloud-zhangjiakou-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1750301983722_TaskContext_logo.png?Expires=1750405284&OSSAccessKeyId=STS.NX5Y***********8W&Signature=uNBTObExLWAh7J%2FYPX9uw%2BMslV0%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5uAEv7337V53aeSZ1z8tnkmbcdh2paTtTz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4wxlQRGU0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bgxqt0OxsGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU7tn6l7MytAXxqAAQp4DQPgtjJpGipxkBpHLuNcGBShBy0T%2FpykyCMMvjeeh8Njd2uoNr8a5YOQwSurIQBC%2Fdl7%2FLGF1seWmsvRe8rz93egKbfC4VJaqXYns7EtnxWHfeg6lVso34AuucxdMPTZ%2Bzu2Y76yPUhGWYG6RX%2BLU%2FTFWHUtiXium458vUuIIAA%3D",
			"status": "success"
		},
		"zIndex": 1,
		"isNode": true
	}, {
		"position": {
			"x": 589,
			"y": 55
		},
		"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": "",
				"fontSize": 12,
				"refX": 0.5,
				"refY": "100%",
				"refY2": 4,
				"textAnchor": "middle",
				"textVerticalAnchor": "top"
			}
		},
		"visible": true,
		"shape": "circle",
		"id": "EndEvent_1iulmg0",
		"data": {
			"appType": "basic",
			"nodeType": "endEvent",
			"valueData": {},
			"advance": {},
			"icon": "icon-radio-off-full"
		},
		"zIndex": 1,
		"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": "SequenceFlow_0q5h2ge",
		"data": {
			"isRequired": false,
			"appType": "basic",
			"nodeType": "sequenceFlow",
			"icon": "icon-upper-right-arrow"
		},
		"labels": [],
		"isNode": false,
		"source": {
			"cell": "Action_0vxihh8"
		},
		"target": {
			"cell": "EndEvent_1iulmg0"
		},
		"vertices": []
	}, {
		"shape": "custom-edge",
		"attrs": {
			"line": {
				"stroke": "#63ba4d",
				"targetMarker": {
					"stroke": "#63ba4d"
				}
			}
		},
		"zIndex": 1,
		"id": "SequenceFlow_0g6a5ap",
		"data": {
			"isRequired": false,
			"appType": "basic",
			"nodeType": "sequenceFlow",
			"icon": "icon-upper-right-arrow"
		},
		"labels": [],
		"isNode": false,
		"source": {
			"cell": "Action_09hece0"
		},
		"target": {
			"cell": "Action_0vxihh8"
		},
		"vertices": []
	}, {
		"shape": "custom-edge",
		"attrs": {
			"line": {
				"stroke": "#63ba4d",
				"targetMarker": {
					"stroke": "#63ba4d"
				}
			}
		},
		"zIndex": 1,
		"id": "SequenceFlow_1gcjzzz",
		"data": {
			"isRequired": false,
			"appType": "basic",
			"nodeType": "sequenceFlow",
			"icon": "icon-upper-right-arrow"
		},
		"labels": [],
		"isNode": false,
		"source": {
			"cell": "Action_0xquztz"
		},
		"target": {
			"cell": "Action_1d9s59u"
		},
		"vertices": []
	}, {
		"shape": "custom-edge",
		"attrs": {
			"line": {
				"stroke": "#63ba4d",
				"targetMarker": {
					"stroke": "#63ba4d"
				}
			}
		},
		"zIndex": 1,
		"id": "SequenceFlow_18r8ybj",
		"data": {
			"isRequired": false,
			"appType": "basic",
			"nodeType": "sequenceFlow",
			"icon": "icon-upper-right-arrow"
		},
		"labels": [],
		"isNode": false,
		"source": {
			"cell": "Action_0geouqf"
		},
		"target": {
			"cell": "Action_0oc837j"
		},
		"vertices": []
	}, {
		"position": {
			"x": 231,
			"y": 40
		},
		"size": {
			"width": 137,
			"height": 66
		},
		"view": "react-shape-view",
		"shape": "activity",
		"id": "Action_09hece0",
		"data": {
			"nodeName": "TaskContext_1",
			"appType": "component",
			"componentName": "TaskContext",
			"nodeType": "action",
			"actionName": "setContext",
			"valueData": {
				"value": "jys_${event._req_uuid}",
				"ttl": "60",
				"key": "name1"
			},
			"advance": {
				"onError": "stop_cur_flow",
				"rspStatusType": "3",
				"rspStatusThreshold": "0"
			},
			"icon": "https://sophon-gen-cloud-zhangjiakou-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1750301983722_TaskContext_logo.png?Expires=1750405284&OSSAccessKeyId=STS.NX5Y***********8W&Signature=uNBTObExLWAh7J%2FYPX9uw%2BMslV0%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5uAEv7337V53aeSZ1z8tnkmbcdh2paTtTz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4wxlQRGU0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bgxqt0OxsGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU7tn6l7MytAXxqAAQp4DQPgtjJpGipxkBpHLuNcGBShBy0T%2FpykyCMMvjeeh8Njd2uoNr8a5YOQwSurIQBC%2Fdl7%2FLGF1seWmsvRe8rz93egKbfC4VJaqXYns7EtnxWHfeg6lVso34AuucxdMPTZ%2Bzu2Y76yPUhGWYG6RX%2BLU%2FTFWHUtiXium458vUuIIAA%3D",
			"status": "success"
		},
		"zIndex": 1,
		"isNode": true
	}, {
		"position": {
			"x": -221,
			"y": 40
		},
		"size": {
			"width": 137,
			"height": 66
		},
		"view": "react-shape-view",
		"shape": "activity",
		"id": "Action_0oc837j",
		"data": {
			"nodeName": "TaskContext_5",
			"appType": "component",
			"componentName": "TaskContext",
			"nodeType": "action",
			"actionName": "getListContext",
			"valueData": {
				"key": "nameList1"
			},
			"advance": {
				"onError": "stop_cur_flow",
				"rspStatusType": "3",
				"rspStatusThreshold": "0"
			},
			"icon": "https://sophon-gen-cloud-zhangjiakou-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1750301983722_TaskContext_logo.png?Expires=1750405284&OSSAccessKeyId=STS.NX5Y***********8W&Signature=uNBTObExLWAh7J%2FYPX9uw%2BMslV0%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5uAEv7337V53aeSZ1z8tnkmbcdh2paTtTz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4wxlQRGU0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bgxqt0OxsGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU7tn6l7MytAXxqAAQp4DQPgtjJpGipxkBpHLuNcGBShBy0T%2FpykyCMMvjeeh8Njd2uoNr8a5YOQwSurIQBC%2Fdl7%2FLGF1seWmsvRe8rz93egKbfC4VJaqXYns7EtnxWHfeg6lVso34AuucxdMPTZ%2Bzu2Y76yPUhGWYG6RX%2BLU%2FTFWHUtiXium458vUuIIAA%3D",
			"status": "success"
		},
		"zIndex": 1,
		"isNode": true
	}, {
		"position": {
			"x": 396,
			"y": 40
		},
		"size": {
			"width": 137,
			"height": 66
		},
		"view": "react-shape-view",
		"shape": "activity",
		"id": "Action_0vxihh8",
		"data": {
			"nodeName": "TaskContext_2",
			"appType": "component",
			"componentName": "TaskContext",
			"nodeType": "action",
			"actionName": "getContext",
			"valueData": {
				"key": "name1"
			},
			"advance": {
				"onError": "stop_cur_flow",
				"rspStatusType": "3",
				"rspStatusThreshold": "0"
			},
			"icon": "https://sophon-gen-cloud-zhangjiakou-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1750301983722_TaskContext_logo.png?Expires=1750405284&OSSAccessKeyId=STS.NX5Y***********8W&Signature=uNBTObExLWAh7J%2FYPX9uw%2BMslV0%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5uAEv7337V53aeSZ1z8tnkmbcdh2paTtTz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4wxlQRGU0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bgxqt0OxsGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU7tn6l7MytAXxqAAQp4DQPgtjJpGipxkBpHLuNcGBShBy0T%2FpykyCMMvjeeh8Njd2uoNr8a5YOQwSurIQBC%2Fdl7%2FLGF1seWmsvRe8rz93egKbfC4VJaqXYns7EtnxWHfeg6lVso34AuucxdMPTZ%2Bzu2Y76yPUhGWYG6RX%2BLU%2FTFWHUtiXium458vUuIIAA%3D",
			"status": "success"
		},
		"zIndex": 1,
		"isNode": true
	}, {
		"shape": "custom-edge",
		"attrs": {
			"line": {
				"stroke": "#63ba4d",
				"targetMarker": {
					"stroke": "#63ba4d"
				}
			}
		},
		"zIndex": 1,
		"id": "SequenceFlow_033a4zj",
		"data": {
			"isRequired": false,
			"appType": "basic",
			"nodeType": "sequenceFlow",
			"icon": "icon-upper-right-arrow"
		},
		"labels": [],
		"isNode": false,
		"source": {
			"cell": "Action_1d9s59u"
		},
		"target": {
			"cell": "Action_0geouqf"
		},
		"vertices": []
	}, {
		"position": {
			"x": -1028,
			"y": 55
		},
		"size": {
			"width": 36,
			"height": 36
		},
		"attrs": {
			"body": {
				"fill": "white",
				"strokeOpacity": 0.95,
				"stroke": "#63ba4d",
				"strokeWidth": 2
			},
			"label": {
				"text": "",
				"fontSize": 12,
				"refX": 0.5,
				"refY": "100%",
				"refY2": 4,
				"textAnchor": "middle",
				"textVerticalAnchor": "top"
			},
			"path": {
				"stroke": "#63ba4d"
			}
		},
		"visible": true,
		"shape": "circle",
		"id": "StartEvent_1",
		"data": {
			"appType": "basic",
			"nodeType": "startEvent",
			"valueData": {},
			"advance": {},
			"icon": "icon-circle"
		},
		"zIndex": 1,
		"markup": [{
			"tagName": "circle",
			"selector": "body"
		}, {
			"tagName": "text",
			"selector": "label"
		}],
		"isNode": true
	}, {
		"shape": "custom-edge",
		"attrs": {
			"line": {
				"stroke": "#63ba4d",
				"targetMarker": {
					"stroke": "#63ba4d"
				}
			}
		},
		"zIndex": 1,
		"id": "SequenceFlow_047h4kl",
		"data": {
			"isRequired": false,
			"appType": "basic",
			"nodeType": "sequenceFlow",
			"icon": "icon-upper-right-arrow"
		},
		"labels": [],
		"isNode": false,
		"source": {
			"cell": "Action_0oc837j"
		},
		"target": {
			"cell": "Action_1sons4h"
		},
		"vertices": []
	}, {
		"shape": "custom-edge",
		"attrs": {
			"line": {
				"stroke": "#63ba4d",
				"targetMarker": {
					"stroke": "#63ba4d"
				}
			}
		},
		"zIndex": 1,
		"id": "SequenceFlow_0e5ftrg",
		"data": {
			"isRequired": false,
			"appType": "basic",
			"nodeType": "sequenceFlow",
			"icon": "icon-upper-right-arrow"
		},
		"labels": [],
		"isNode": false,
		"source": {
			"cell": "Action_1sons4h"
		},
		"target": {
			"cell": "Action_09hece0"
		},
		"vertices": []
	}, {
		"position": {
			"x": -901,
			"y": 40
		},
		"size": {
			"width": 137,
			"height": 66
		},
		"view": "react-shape-view",
		"shape": "activity",
		"id": "Action_0xquztz",
		"data": {
			"nodeName": "TaskContext_3",
			"appType": "component",
			"componentName": "TaskContext",
			"nodeType": "action",
			"actionName": "getListContext",
			"valueData": {
				"key": "nameList1"
			},
			"advance": {
				"onError": "stop_cur_flow",
				"rspStatusType": "3",
				"rspStatusThreshold": "0"
			},
			"icon": "https://sophon-gen-cloud-zhangjiakou-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1750301983722_TaskContext_logo.png?Expires=1750405284&OSSAccessKeyId=STS.NX5Y***********8W&Signature=uNBTObExLWAh7J%2FYPX9uw%2BMslV0%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5uAEv7337V53aeSZ1z8tnkmbcdh2paTtTz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4wxlQRGU0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bgxqt0OxsGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU7tn6l7MytAXxqAAQp4DQPgtjJpGipxkBpHLuNcGBShBy0T%2FpykyCMMvjeeh8Njd2uoNr8a5YOQwSurIQBC%2Fdl7%2FLGF1seWmsvRe8rz93egKbfC4VJaqXYns7EtnxWHfeg6lVso34AuucxdMPTZ%2Bzu2Y76yPUhGWYG6RX%2BLU%2FTFWHUtiXium458vUuIIAA%3D",
			"status": "success"
		},
		"zIndex": 1,
		"isNode": true
	}, {
		"position": {
			"x": -711,
			"y": 40
		},
		"size": {
			"width": 137,
			"height": 66
		},
		"view": "react-shape-view",
		"shape": "activity",
		"id": "Action_1d9s59u",
		"data": {
			"nodeName": "TaskContext_4",
			"appType": "component",
			"componentName": "TaskContext",
			"nodeType": "action",
			"actionName": "appendListContext",
			"valueData": {
				"value": "jys_${event._req_uuid}",
				"ttl": "60",
				"key": "nameList1"
			},
			"advance": {
				"onError": "stop_cur_flow",
				"rspStatusType": "3",
				"rspStatusThreshold": "0"
			},
			"icon": "https://sophon-gen-cloud-zhangjiakou-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1750301983722_TaskContext_logo.png?Expires=1750405284&OSSAccessKeyId=STS.NX5Y***********8W&Signature=uNBTObExLWAh7J%2FYPX9uw%2BMslV0%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5uAEv7337V53aeSZ1z8tnkmbcdh2paTtTz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4wxlQRGU0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2Bgxqt0OxsGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU7tn6l7MytAXxqAAQp4DQPgtjJpGipxkBpHLuNcGBShBy0T%2FpykyCMMvjeeh8Njd2uoNr8a5YOQwSurIQBC%2Fdl7%2FLGF1seWmsvRe8rz93egKbfC4VJaqXYns7EtnxWHfeg6lVso34AuucxdMPTZ%2Bzu2Y76yPUhGWYG6RX%2BLU%2FTFWHUtiXium458vUuIIAA%3D",
			"status": "success"
		},
		"zIndex": 1,
		"isNode": true
	}]
}

setContext

Sets a non-list context.

Important

If you execute the action on the same key twice, the second value overwrites the first value.

Parameters

Parameter

Description

Example

key

The key to set.

k1

value

The value to set. Constants, expressions, system parameters, and variable parameters are supported. For more information, see Component parameters and node execution flow.

${event._tenant_id}

ttl

The expiration time of the key-value pair, in seconds.

Note

The default value is 86400 seconds, which is one day. The maximum value cannot exceed 30 days.

600

getContext

Queries a non-list context.

Parameters

Parameter

Description

Example

key

The key to query.

k1

Sample response

{
  "value": "ba290292-19a8-4926-9eaa-9a746fc0bd32",
  "key": "k1"
}

appendListContext

Adds a value to a list-type context.

Important

If you execute the action on the same key twice, the new value is appended to the existing list.

For example, if you execute the action on the same key with the value v1 and then execute it again with the value v2, the value of the key becomes ["v1","v2"].

Parameters

Parameter

Description

Example

key

The key to set.

k1

value

The value to append. Constants, expressions, system parameters, and variable parameters are supported. For more information, see Component parameters and node execution flow.

${event._tenant_id}

ttl

The expiration time of the key-value pair, in seconds.

Note

The default value is 86400 seconds, which is one day. The maximum value cannot exceed 30 days.

600

getListContext

Queries a list-type context.

Parameters

Parameter

Description

Example

key

The key to query.

k1

Sample response

 {
    "value": [
      "4d432034-03ae-4905-a2d8-00237462bc37",
      "4d432034-03ae-4905-a2d8-00237462bc37_1"
    ],
    "key": "k1"
  }