DataFormat組件主要提供資料處理服務,比如彙總、拼接關聯資料等。
功能描述
動作 | 描述 | 使用情境 |
將多張表進行join串連,並將指定的欄位進行輸出。 | 兩張表或者多張表根據某個key進行join串連。 | |
將輸入的資料根據某個key進行分組。 | 對array進行分組。 | |
將輸入的資料的value進行分批拼接,可以添加首碼、尾碼、佔空間字元串。 | array中的內容需要拼接。 | |
以左節點為主表進行join左串連,並輸出指定的欄位。 | join時需要保留左節點所有資料,不需要右節點的無關資料。 | |
將字串轉為JSON。 | 字串轉JSON。 | |
把多個行資料群組合在一起,也就是把多個JSONObject放在一起形成新的JSONArray。 | 多個JSON轉為一個JSONArray。 | |
對資料做轉換,同時會產生一個新的表。 | 資料轉換或者彙總多個資料到一張表中。 |
組件配置樣本
本文提供了DataFormat組件各動作的參數配置樣本,您可將其作為測試劇本匯入。通過可視化流程編輯器,能更直觀地瞭解和測試各動作的配置參數,輕鬆掌握組件的功能邏輯與使用方式。操作步驟可參考劇本匯入。
請先將樣本資料儲存為JSON檔案。
{
"cells": [
{
"position": {
"x": -510,
"y": 20
},
"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",
"zIndex": 1,
"data": {
"nodeType": "startEvent",
"appType": "basic",
"valueData": {
},
"icon": "icon-circle"
},
"markup": [
{
"tagName": "circle",
"selector": "body"
},
{
"tagName": "text",
"selector": "label"
}
],
"isNode": true
},
{
"position": {
"x": -110,
"y": 5
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "8d42d64a-fb1a-41fe-aeeb-000849b57892",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "leftJoin",
"valueData": {
"leftNode": "[{\"action\":\"11\",\"uuid\":[{\"uuid-key\":\"1\"}]},{\"action\":\"21\",\"uuid\":[{\"uuid-key\":\"2\"}]}]",
"rightNode": "[{\"uuid\":[{\"uuid-key\":\"1\"}],\"host\":\"196.1.*.*\"},{\"uuid\":[{\"uuid-key\":\"1\"}],\"host\":\"196.2.*.*\"}]",
"joinFields": "[{\"fieldName\":\"leftNode.uuid\",\"fieldValue\":\"rightNode.uuid\"}]",
"leftOutputFilelds": "[{\"fieldName\":\"*\",\"fieldValue\":\"action,uuid\"}]",
"rightOutputFields": "[{\"fieldName\":\"網站\",\"fieldValue\":\"host\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "Left Join,關鍵字會從左表 (table_name1) 那裡返回所有的行,即使在右表 (table_name2) 中沒有匹配的行。",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "leftJoin",
"cascaderValue": [],
"status": "success"
},
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "17bbdf75-e724-4c63-a055-e184bf946b87",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "StartEvent_1"
},
"target": {
"cell": "8d42d64a-fb1a-41fe-aeeb-000849b57892"
}
},
{
"position": {
"x": 222.5,
"y": 10
},
"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": "957ea6d3-2562-4f0f-829e-f3613f9e1f16",
"zIndex": 1,
"data": {
"nodeType": "endEvent",
"appType": "basic",
"nodeName": "結束",
"icon": "icon-radio-off-full",
"description": "劇本結束節點"
},
"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": "ada87a01-f8ff-4222-b33d-c42e3367ff47",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "8d42d64a-fb1a-41fe-aeeb-000849b57892"
},
"target": {
"cell": "957ea6d3-2562-4f0f-829e-f3613f9e1f16"
},
"vertices": []
},
{
"position": {
"x": -310,
"y": 110
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "7309e77a-0c93-4396-b28b-9b0c1672cd4e",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "leftJSON",
"valueData": {
"inputData": "[{\"action\":\"11\",\"uuid\":[{\"uuid-key\":\"1\"}]},{\"action\":\"21\",\"uuid\":[{\"uuid-key\":\"2\"}]}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "把輸入資料轉換為JSON類型的。如果是JSONArray,則把所有的數組直接放到datalist中。如果是JSONObject,則作為datalist的一行資料",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "convertToJSON",
"status": "success"
},
"isNode": true
},
{
"position": {
"x": -68,
"y": 110
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "e3134166-6d6c-4879-846b-a9b00ad6c4a6",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "rightJSON",
"valueData": {
"inputData": "[{\"uuid\":[{\"uuid-key\":\"1\"}],\"host\":\"196.1.*.*\"},{\"uuid\":[{\"uuid-key\":\"1\"}],\"host\":\"196.2.*.*\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "把輸入資料轉換為JSON類型的。如果是JSONArray,則把所有的數組直接放到datalist中。如果是JSONObject,則作為datalist的一行資料",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "convertToJSON",
"cascaderValue": [
{
"label": "leftJSON",
"value": "${leftJSON}",
"children": [
{
"label": "leftJSON.total_data",
"name": "leftJSON.total_data",
"value": "${leftJSON.total_data}"
},
{
"label": "leftJSON.status",
"name": "leftJSON.status",
"value": "${leftJSON.status}"
},
{
"label": "leftJSON.total_exe",
"name": "leftJSON.total_exe",
"value": "${leftJSON.total_exe}"
},
{
"label": "leftJSON.datalist.*.uuid.*.uuid-key",
"name": "leftJSON.datalist.*.uuid.*.uuid-key",
"value": "${leftJSON.datalist.*.uuid.*.uuid-key}"
},
{
"label": "leftJSON.total_data_successful",
"name": "leftJSON.total_data_successful",
"value": "${leftJSON.total_data_successful}"
},
{
"label": "leftJSON.total_data_with_dup",
"name": "leftJSON.total_data_with_dup",
"value": "${leftJSON.total_data_with_dup}"
},
{
"label": "leftJSON.total_exe_successful",
"name": "leftJSON.total_exe_successful",
"value": "${leftJSON.total_exe_successful}"
},
{
"label": "leftJSON.datalist.*.action",
"name": "leftJSON.datalist.*.action",
"value": "${leftJSON.datalist.*.action}"
}
]
}
],
"status": "success"
},
"isNode": true
},
{
"position": {
"x": 172,
"y": 110
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "0ac43fe1-2031-4b6e-a883-d788c603e944",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "joindata",
"valueData": {
"inputNodes": "[{\"fieldName\":\"leftJSON\",\"fieldValue\":\"${JSONArray:leftJSON.datalist.*}\"},{\"fieldName\":\"rightJSON\",\"fieldValue\":\"${JSONArray:rightJSON.datalist.*}\"}]",
"joinFields": "[{\"fieldName\":\"leftJSON.uuid\",\"fieldValue\":\"rightJSON.uuid\"}]",
"outputFields": "[{\"fieldName\":\"myhost\",\"fieldValue\":\"rightJSON.host\"},{\"fieldName\":\"myaction\",\"fieldValue\":\"leftJSON.action\"},{\"fieldName\":\"uuid\",\"fieldValue\":\"leftJSON.uuid\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "提供類似多表JOIN的文法,以逗號分割,對處理節點的datalist.*的資料當作多長多列的資料",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "joindata",
"cascaderValue": [
{
"label": "rightJSON",
"value": "${rightJSON}",
"children": [
{
"label": "rightJSON.total_data_with_dup",
"name": "rightJSON.total_data_with_dup",
"value": "${rightJSON.total_data_with_dup}"
},
{
"label": "rightJSON.total_data",
"name": "rightJSON.total_data",
"value": "${rightJSON.total_data}"
},
{
"label": "rightJSON.status",
"name": "rightJSON.status",
"value": "${rightJSON.status}"
},
{
"label": "rightJSON.datalist.*.host",
"name": "rightJSON.datalist.*.host",
"value": "${rightJSON.datalist.*.host}"
},
{
"label": "rightJSON.total_exe_successful",
"name": "rightJSON.total_exe_successful",
"value": "${rightJSON.total_exe_successful}"
},
{
"label": "rightJSON.datalist.*.uuid.*.uuid-key",
"name": "rightJSON.datalist.*.uuid.*.uuid-key",
"value": "${rightJSON.datalist.*.uuid.*.uuid-key}"
},
{
"label": "rightJSON.total_data_successful",
"name": "rightJSON.total_data_successful",
"value": "${rightJSON.total_data_successful}"
},
{
"label": "rightJSON.total_exe",
"name": "rightJSON.total_exe",
"value": "${rightJSON.total_exe}"
}
]
},
{
"label": "leftJSON",
"value": "${leftJSON}",
"children": [
{
"label": "leftJSON.total_data",
"name": "leftJSON.total_data",
"value": "${leftJSON.total_data}"
},
{
"label": "leftJSON.status",
"name": "leftJSON.status",
"value": "${leftJSON.status}"
},
{
"label": "leftJSON.total_exe",
"name": "leftJSON.total_exe",
"value": "${leftJSON.total_exe}"
},
{
"label": "leftJSON.datalist.*.uuid.*.uuid-key",
"name": "leftJSON.datalist.*.uuid.*.uuid-key",
"value": "${leftJSON.datalist.*.uuid.*.uuid-key}"
},
{
"label": "leftJSON.total_data_successful",
"name": "leftJSON.total_data_successful",
"value": "${leftJSON.total_data_successful}"
},
{
"label": "leftJSON.total_data_with_dup",
"name": "leftJSON.total_data_with_dup",
"value": "${leftJSON.total_data_with_dup}"
},
{
"label": "leftJSON.total_exe_successful",
"name": "leftJSON.total_exe_successful",
"value": "${leftJSON.total_exe_successful}"
},
{
"label": "leftJSON.datalist.*.action",
"name": "leftJSON.datalist.*.action",
"value": "${leftJSON.datalist.*.action}"
}
]
}
],
"status": "success"
},
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "a6f70a6a-f5a0-4e5c-9de5-5230dc1deefa",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"router": {
"name": "normal"
},
"isNode": false,
"source": {
"cell": "StartEvent_1"
},
"target": {
"cell": "7309e77a-0c93-4396-b28b-9b0c1672cd4e"
},
"vertices": [
{
"x": -492,
"y": 143
}
]
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "13db0fe6-495d-4b16-80ca-df96d33beff1",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "7309e77a-0c93-4396-b28b-9b0c1672cd4e"
},
"target": {
"cell": "e3134166-6d6c-4879-846b-a9b00ad6c4a6"
}
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "9f472b01-bb53-4bac-a8dd-a67c3c537fa9",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "e3134166-6d6c-4879-846b-a9b00ad6c4a6"
},
"target": {
"cell": "0ac43fe1-2031-4b6e-a883-d788c603e944"
}
},
{
"position": {
"x": 440,
"y": 110
},
"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": "a66c2f32-7d29-40a2-8e7e-622f09cf23dd",
"zIndex": 1,
"data": {
"nodeType": "endEvent",
"appType": "basic",
"nodeName": "結束",
"icon": "icon-radio-off-full",
"description": "劇本結束節點"
},
"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": "caf56653-94c8-42f8-beec-f4deb72dc93f",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "0ac43fe1-2031-4b6e-a883-d788c603e944"
},
"target": {
"cell": "a66c2f32-7d29-40a2-8e7e-622f09cf23dd"
}
},
{
"position": {
"x": -310,
"y": 262
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "83110da4-c8e7-4d19-8e79-51f8903625b2",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "mockData",
"valueData": {
"inputData": "[{\"攻擊類型\":\"網站後門\",\"count\":\"1\",\"startTime\":\"1646115503000\",\"endTime\":\"1646115503000\",\"securityEventIds\":\"330706\"},{\"攻擊類型\":\"網站後門\",\"count\":\"1\",\"startTime\":\"1646114346000\",\"endTime\":\"1646114346000\",\"securityEventIds\":\"330700\"},{\"攻擊類型\":\"應用白名單\",\"count\":\"1\",\"startTime\":\"1646114098000\",\"endTime\":\"1646114098000\",\"securityEventIds\":\"330699\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "把輸入資料轉換為JSON類型的。如果是JSONArray,則把所有的數組直接放到datalist中。如果是JSONObject,則作為datalist的一行資料",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "convertToJSON",
"status": "success"
},
"isNode": true
},
{
"position": {
"x": -80,
"y": 262
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "5314c487-af24-4dbf-bc11-f79bed39b60b",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "groupbydata",
"valueData": {
"inputNode": "${JSONArray:mockData.datalist.*}",
"groupByKeys": "攻擊類型",
"outputFields": "[{\"fieldName\":\"攻擊次數\",\"fieldType\":\"jq\",\"fieldValue\":\".datalist | map_values(.count)|add|length\"},{\"fieldName\":\"最新攻擊時間\",\"fieldType\":\"jq\",\"fieldValue\":\"[.datalist[].endTime|tonumber]|max\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "對某個資料來源做彙總操作",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "groupbydata",
"status": "success"
},
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "e0ac28e4-a693-4c24-aad6-e56349468ecc",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"router": {
"name": "normal"
},
"isNode": false,
"source": {
"cell": "StartEvent_1"
},
"target": {
"cell": "83110da4-c8e7-4d19-8e79-51f8903625b2"
},
"vertices": [
{
"x": -492,
"y": 295
}
]
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "a555fddb-9eb9-48f8-8d01-836537104767",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "83110da4-c8e7-4d19-8e79-51f8903625b2"
},
"target": {
"cell": "5314c487-af24-4dbf-bc11-f79bed39b60b"
}
},
{
"position": {
"x": 240,
"y": 270
},
"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": "7779ea7e-b587-4512-94e0-d00dc76251e4",
"zIndex": 1,
"data": {
"nodeType": "endEvent",
"appType": "basic",
"nodeName": "結束",
"icon": "icon-radio-off-full",
"description": "劇本結束節點"
},
"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": "70f8f4cc-0561-4bd8-aecd-6fa2441c0b38",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "5314c487-af24-4dbf-bc11-f79bed39b60b"
},
"target": {
"cell": "7779ea7e-b587-4512-94e0-d00dc76251e4"
}
},
{
"position": {
"x": -140,
"y": 400
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "a6080934-1dd4-4d87-b573-1f90be7d4535",
"zIndex": 1,
"data": {
"isDebug": false,
"nodeType": "action",
"appType": "component",
"nodeName": "concatFieldtoBatch",
"valueData": {
"inputField": "[{\"攻擊類型\":\"網站後門\"},{\"攻擊類型\":\"網站後門\"},{\"攻擊類型\":\"網站後門\"},{\"攻擊類型\":\"應用白名單\"},{\"攻擊類型\":\"應用白名單\"}]",
"batchSize": "2",
"concatStr": "\" ## \"",
"fieldAddPrefix": "前",
"fieldAddSuffix": "後"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "把某個欄位的值分割成小批次,每個批次拼接成一個字串",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "concatFieldtoBatch",
"status": "success",
"cascaderValue": []
},
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "06606aa2-6573-4fe2-83e3-2f66bb70db76",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"router": {
"name": "normal"
},
"isNode": false,
"source": {
"cell": "StartEvent_1"
},
"target": {
"cell": "a6080934-1dd4-4d87-b573-1f90be7d4535"
},
"vertices": [
{
"x": -492,
"y": 433
}
]
},
{
"position": {
"x": 198,
"y": 415
},
"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": "59bc46fa-d6cb-4e89-9107-d30216c01d2b",
"zIndex": 1,
"data": {
"nodeType": "endEvent",
"appType": "basic",
"nodeName": "結束",
"icon": "icon-radio-off-full",
"description": "劇本結束節點"
},
"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": "fc410d6d-ff0f-4d01-8c0b-2a2e3104d8ce",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "a6080934-1dd4-4d87-b573-1f90be7d4535"
},
"target": {
"cell": "59bc46fa-d6cb-4e89-9107-d30216c01d2b"
}
},
{
"position": {
"x": -180,
"y": -180
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "c1fd4832-8717-44d8-9a27-dc6f45499f47",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "convertToJSON",
"valueData": {
"inputData": "[{\"攻擊類型\":\"網站後門\"},{\"攻擊類型\":\"網站後門\"},{\"攻擊類型\":\"網站後門\"},{\"攻擊類型\":\"應用白名單\"},{\"攻擊類型\":\"應用白名單\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "把輸入資料轉換為JSON類型的。如果是JSONArray,則把所有的數組直接放到datalist中。如果是JSONObject,則作為datalist的一行資料",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "convertToJSON",
"status": "success"
},
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "4f498976-09d4-4550-9e73-2241077b1922",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"router": {
"name": "normal"
},
"isNode": false,
"source": {
"cell": "StartEvent_1"
},
"target": {
"cell": "c1fd4832-8717-44d8-9a27-dc6f45499f47"
},
"vertices": [
{
"x": -492,
"y": -147
}
]
},
{
"position": {
"x": 121,
"y": -165
},
"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": "46a3b954-56d1-4fd2-b016-08e144390137",
"zIndex": 1,
"data": {
"nodeType": "endEvent",
"appType": "basic",
"nodeName": "結束",
"icon": "icon-radio-off-full",
"description": "劇本結束節點"
},
"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": "96eddfbb-e835-43e0-8d7a-df75888519fb",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "c1fd4832-8717-44d8-9a27-dc6f45499f47"
},
"target": {
"cell": "46a3b954-56d1-4fd2-b016-08e144390137"
}
},
{
"position": {
"x": 117.5,
"y": 505
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "ec535172-836f-4e5e-9e4a-ef546f030f5d",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "uniondata",
"valueData": {
"inputNodes": "[{\"fieldName\":\"leftJSON\",\"fieldValue\":\"${JSONArray:left.datalist.*}\"},{\"fieldName\":\"rightJSON\",\"fieldValue\":\"${JSONArray:right.datalist.*}\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "把多個上遊的多行結果Union在一起",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "uniondata",
"cascaderValue": [
{
"label": "right",
"value": "${right}",
"children": [
{
"label": "right.total_data_with_dup",
"name": "right.total_data_with_dup",
"value": "${right.total_data_with_dup}"
},
{
"label": "right.total_data_successful",
"name": "right.total_data_successful",
"value": "${right.total_data_successful}"
},
{
"label": "right.status",
"name": "right.status",
"value": "${right.status}"
},
{
"label": "right.total_data",
"name": "right.total_data",
"value": "${right.total_data}"
},
{
"label": "right.datalist.*.uuid.*.uuid-key",
"name": "right.datalist.*.uuid.*.uuid-key",
"value": "${right.datalist.*.uuid.*.uuid-key}"
},
{
"label": "right.total_exe",
"name": "right.total_exe",
"value": "${right.total_exe}"
},
{
"label": "right.total_exe_successful",
"name": "right.total_exe_successful",
"value": "${right.total_exe_successful}"
},
{
"label": "right.datalist.*.host",
"name": "right.datalist.*.host",
"value": "${right.datalist.*.host}"
}
]
},
{
"label": "left",
"value": "${left}",
"children": [
{
"label": "left.total_data",
"name": "left.total_data",
"value": "${left.total_data}"
},
{
"label": "left.total_exe_successful",
"name": "left.total_exe_successful",
"value": "${left.total_exe_successful}"
},
{
"label": "left.status",
"name": "left.status",
"value": "${left.status}"
},
{
"label": "left.datalist.*.action",
"name": "left.datalist.*.action",
"value": "${left.datalist.*.action}"
},
{
"label": "left.datalist.*.uuid.*.uuid-key",
"name": "left.datalist.*.uuid.*.uuid-key",
"value": "${left.datalist.*.uuid.*.uuid-key}"
},
{
"label": "left.total_exe",
"name": "left.total_exe",
"value": "${left.total_exe}"
},
{
"label": "left.total_data_with_dup",
"name": "left.total_data_with_dup",
"value": "${left.total_data_with_dup}"
},
{
"label": "left.total_data_successful",
"name": "left.total_data_successful",
"value": "${left.total_data_successful}"
}
]
}
],
"status": "success"
},
"isNode": true
},
{
"position": {
"x": 400,
"y": 520
},
"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": "598f44e2-1582-486f-95f2-23fba92d9486",
"zIndex": 1,
"data": {
"nodeType": "endEvent",
"appType": "basic",
"nodeName": "結束",
"icon": "icon-radio-off-full",
"description": "劇本結束節點"
},
"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": "4a22f5d7-d8a1-416b-9969-019f530902f6",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "ec535172-836f-4e5e-9e4a-ef546f030f5d"
},
"target": {
"cell": "598f44e2-1582-486f-95f2-23fba92d9486"
}
},
{
"position": {
"x": -210,
"y": 610
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "7de7117c-1da6-4d03-8a09-b761114a7b05",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "formatdata",
"valueData": {
"outputFields": "[{\"fieldName\":\"name\",\"fieldValue\":\"test\"},{\"fieldName\":\"age\",\"fieldValue\":\"18\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "產生一個新的資料",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "formatdata",
"status": "success",
"cascaderValue": [],
"isDebug": false
},
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "4136040c-0b42-4557-94bb-8b77b6f5f3c5",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"router": {
"name": "normal"
},
"isNode": false,
"source": {
"cell": "StartEvent_1"
},
"target": {
"cell": "7de7117c-1da6-4d03-8a09-b761114a7b05"
},
"vertices": [
{
"x": -492,
"y": 643
}
]
},
{
"position": {
"x": 71,
"y": 625
},
"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": "8978b5d1-3cae-4e43-98d0-aca302555856",
"zIndex": 1,
"data": {
"nodeType": "endEvent",
"appType": "basic",
"nodeName": "結束",
"icon": "icon-radio-off-full",
"description": "劇本結束節點"
},
"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": "fe238014-7582-4482-b9d4-cf20cbc40e53",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "7de7117c-1da6-4d03-8a09-b761114a7b05"
},
"target": {
"cell": "8978b5d1-3cae-4e43-98d0-aca302555856"
}
},
{
"position": {
"x": -380,
"y": 500
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "b300fedc-d828-413c-b593-153dbda5ed1a",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "left",
"valueData": {
"inputData": "[{\"action\":\"11\",\"uuid\":[{\"uuid-key\":\"1\"}]},{\"action\":\"21\",\"uuid\":[{\"uuid-key\":\"2\"}]}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "把輸入資料轉換為JSON類型的。如果是JSONArray,則把所有的數組直接放到datalist中。如果是JSONObject,則作為datalist的一行資料",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "convertToJSON",
"status": "success"
},
"isNode": true
},
{
"position": {
"x": -80,
"y": 505
},
"size": {
"width": 137,
"height": 66
},
"view": "react-shape-view",
"shape": "activity",
"id": "c5baaffa-df7e-47f4-851d-7289276ad76b",
"zIndex": 1,
"data": {
"nodeType": "action",
"appType": "component",
"nodeName": "right",
"valueData": {
"inputData": "[{\"uuid\":[{\"uuid-key\":\"1\"}],\"host\":\"196.1.*.*\"},{\"uuid\":[{\"uuid-key\":\"1\"}],\"host\":\"196.2.*.*\"}]"
},
"icon": "https://sophon-gen-v2.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/1719222281702_DataFormat_logo.png?Expires=1745373374&OSSAccessKeyId=STS.NVCS************&Signature=NG4Wh%2F2zJrendn8IhShW74ymMSA%3D&security-token=CAIS2AJ1q6Ft5B2yfSjIr5X2GMPAo6xY7venWBWHjlgyQexrpZTB1Dz2IHhMenFpAegcv%2Fw%2BlGFZ6%2F8elrp6SJtIXleCZtF94oxN9h2gb4fb4xF6LjaJ0s%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OP3AOrlrBN%2Bdiuf8T9NvMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onDWwAJu0%2FXa7uEo4wydVNjFbM9A65Dqufxn%2Fpgt%2Braj4X7xhhEIOVJSSPbSZBbSxJNvU1RXDxQVcEYWxylurjnXvF%2BA9Gz5Y%2FUGin%2B2svzhw6RGJ1dq8DgINtD0jokjPndRVbLXs84nxS7gbsGn76oY2zradH%2FdU501DLSMytAXxqAAYnrQLesLZ0VOxi7cg9LDO9w1brCl%2Fw1TxYuVpiYFJ11Kc5F2ues4ocueMk3q3AuAFpCyXW646Exz7L86%2Bp3aiLIps5ON%2FjCiP9oG8LAXI4ajG3woQPLdwm9bT20vHi4yEJYVlvntpkk5bLR5mOuE%2B6VPgmB2q2gHJTKgj13KEDwIAA%3D",
"description": "把輸入資料轉換為JSON類型的。如果是JSONArray,則把所有的數組直接放到datalist中。如果是JSONObject,則作為datalist的一行資料",
"advance": {
"inputParamMode": false,
"onError": "stop_cur_flow",
"rspStatusType": 3,
"rspStatusThreshold": 0
},
"componentName": "DataFormat",
"actionName": "convertToJSON",
"status": "success"
},
"isNode": true
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "a8104b42-f869-4296-9681-f67f4f59ecef",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"router": {
"name": "normal"
},
"isNode": false,
"source": {
"cell": "StartEvent_1"
},
"target": {
"cell": "b300fedc-d828-413c-b593-153dbda5ed1a"
},
"vertices": [
{
"x": -492,
"y": 533
}
]
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "c20d8dea-c711-4cc3-b6ea-f86033954390",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "b300fedc-d828-413c-b593-153dbda5ed1a"
},
"target": {
"cell": "c5baaffa-df7e-47f4-851d-7289276ad76b"
}
},
{
"shape": "custom-edge",
"attrs": {
"line": {
"stroke": "#63ba4d",
"targetMarker": {
"stroke": "#63ba4d"
}
}
},
"zIndex": 1,
"id": "c00c6197-85b7-486b-8771-3daa3fdb243e",
"data": {
"nodeType": "sequenceFlow",
"appType": "basic",
"icon": "icon-upper-right-arrow",
"isRequired": false
},
"isNode": false,
"source": {
"cell": "c5baaffa-df7e-47f4-851d-7289276ad76b"
},
"target": {
"cell": "ec535172-836f-4e5e-9e4a-ef546f030f5d"
}
}
]
}joindata
將多張表進行join串連,並將指定的欄位進行輸出。
參數說明
參數 | 描述 |
inputNodes |
|
joinFields |
|
outputFields | join完成後要輸出的欄位,引用格式為[nodeName].[fieldName]。 |
樣本
樣本情境如下:
前置資料節點分別nodeName為leftJSON和rightJSON,資料格式如下:
leftJSON:[{"action":"11","uuid":[{"uuid-key":"1"}]},{"action":"21","uuid":[{"uuid-key":"2"}]}]。
rightJSON:[{"uuid":[{"uuid-key":"1"}],"host":"196.1.*.*"},{"uuid":[{"uuid-key":"1"}],"host":"196.2.*.*"}]。
根據uuid進行關聯進行join連結。
輸出欄位配置:將rightJSON的host輸出為myhost欄位,leftJSON的action欄位輸出為myaction欄位,leftJSON的uuid映射為uuid欄位。
參數 | 參數值 |
inputNodes | 兩行資料,資料配置如下:
說明 "JSONArray:"表示將參數進行類型轉換轉為JSONArray,否則無法完成拉取前置節點資料。 |
joinFields | 左輸入框:leftJSON.uuid,右輸入框:rightJSON.uuid。 |
outputFields | 三行資料,資料配置如下: 左輸入框:myhost,右輸入框:rightJSON.host。 左輸入框:myaction,右輸入框:leftJSON.action。 左輸入框:uuid,右輸入框:leftJSON.uuid。 |
樣本輸出結果如下:
[
{
"myaction": "11",
"uuid": [
{
"uuid-key": "1"
}
],
"myhost": "196.1.*.*"
},
{
"myaction": "11",
"uuid": [
{
"uuid-key": "1"
}
],
"myhost": "196.2.*.*"
}
]groupbydata
將輸入的資料根據某個key進行分組。
參數說明
參數 | 描述 |
inputNode | 輸入的內容,格式為包含多個JSON的JsonArray。 |
groupByKeys | 要分組的key值。 |
outputFields | 分組後輸出的內容,支援jq運算式。 |
樣本
樣本情境如下:
輸入的內容包inputNode含攻擊類型、攻擊次數count、endTime等資訊。
分組欄位為攻擊類型。配置:
輸出欄位配置:count相加輸出為攻擊次數,選擇最近的endTime輸出我為最新攻擊時間。
參數 | 參數值 |
inputNode | |
groupByKeys | 攻擊類型 |
outputFields | 說明 使用jq運算式處理inputNode輸入JSON資料:
|
樣本輸出結果如下:
[
{
"攻擊類型": "網站後門",
"攻擊次數": 2,
"最新攻擊時間": 1646115503000
},
{
"攻擊類型": "應用白名單",
"攻擊次數": 1,
"最新攻擊時間": 1646114098000
}
]concatFiledtoBatch
對輸入資料中的value進行分批拼接。
參數說明
參數 | 描述 |
inputField | 要拼接的內容,格式為包含多個JSON的JsonArray。 |
batchSize | 批量拼接的數量,如2表示 2個JSON拼成一個;-1表示所有拼成一個。 |
concatStr | 拼接符,如果拼接符需要前後有空格,可以用雙引號進行包括,此時不會忽略空格。如:" ## " |
fieldAddPrefix | 拼接後加的首碼。 |
fieldAddSuffix | 拼接後加的尾碼。 |
樣本
樣本情境如下:
將輸入欄位(inputField)中的攻擊類型,按每兩條一組進行拼接,每組資料使用" ## "串連,並為每組結果添加統一首碼"前"和尾碼"後"。
參數 | 參數值 |
inputField | |
batchSize | 2 |
concatStr | " ## " |
fieldAddPrefix | 前 |
fieldAddSuffix | 後 |
樣本輸出結果如下:
[
{
"concatField": "前網站後門後\" ## \"前網站後門後"
},
{
"concatField": "前網站後門後\" ## \"前應用白名單後"
},
{
"concatField": "前應用白名單後"
}
]leftJoin
以左節點為主表進行join左串連。
參數說明
參數 | 描述 |
leftNode |
|
rightNode |
|
joinFields |
|
leftOutputFilelds | 左節點要輸出的欄位,支援key轉換。左側配置框為新名稱,右側配置礦為原始欄位。 說明
|
rightOutputFields | 右節點要輸出的欄位,支援key轉換。支援名稱key轉換。左側配置框為新名稱,右側配置礦為原始欄位。 說明
|
樣本
樣本情境如下:
leftNode包含action、uuid(包含嵌套資料uuid-key),rightNode包含uuid、host。
以leftNode的uuid作為串連欄位。
輸出資料:leftNode輸出action、uuid的value值,不改變key名稱,rightNode輸出host的value值並更名為“網站”。
參數 | 參數值 |
leftNode | 說明 以下資料需要先做類型轉換,轉為JsonArray物件類型 |
rightNode | 說明 以下資料需要先做類型轉換,轉為JsonArray物件類型 |
joinFields | 左輸入框:leftNode.uuid,右輸入框:rightNode.uuid。 |
leftOutputFilelds | 左輸入框:*,右輸入框:action,uuid。 |
rightOutputFields | 左輸入框:網站,右輸入框:host。 |
樣本輸出結果如下:
[
{
"action": "11",
"uuid": [
{
"uuid-key": "1"
}
],
"網站": "196.1.*.*"
},
{
"action": "11",
"uuid": [
{
"uuid-key": "1"
}
],
"網站": "196.2.*.*"
},
{
"action": "21",
"uuid": [
{
"uuid-key": "2"
}
]
}
]convertToJson
將傳入的JSON字串轉為JSON對象,僅做類型轉換。
如果是JSONArray,則把所有的數組直接放到datalist中。
如果是JSONObject,則作為datalist的一行資料。
uniondata
把多個行資料群組合在一起。
參數說明
參數 | 描述 |
inputNodes | 參與組合的節點資料。 |
樣本
樣本說明如下:
前置資料節點分別nodeName為left和right,資料格式如下:
left:[{"action":"11","uuid":[{"uuid-key":"1"}]},{"action":"21","uuid":[{"uuid-key":"2"}]}]。
right:[{"uuid":[{"uuid-key":"1"}],"host":"196.1.*.*"},{"uuid":[{"uuid-key":"1"}],"host":"196.2.*.*"}]
參數 | 參數值 |
inputNodes | 兩行資料,資料配置如下: 左輸入框:leftJSON,右輸入框:${JSONArray:left.datalist.*}。 左輸入框:rightJSON,右輸入框:${JSONArray:right.datalist.*}。 說明
|
樣本輸出結果如下:
[
{
"action": "11",
"uuid": [
{
"uuid-key": "1"
}
]
},
{
"action": "21",
"uuid": [
{
"uuid-key": "2"
}
]
},
{
"uuid": [
{
"uuid-key": "1"
}
],
"host": "196.1.*.*"
},
{
"uuid": [
{
"uuid-key": "1"
}
],
"host": "196.2.*.*"
}
]formatdata
資料轉換或者彙總多個資料
參數
參數 | 描述 |
inputNodes | 需要格式化的資料節點。 |
樣本
參數 | 參數值 |
inputNodes | 兩行資料,資料配置如下: 左輸入框:name,右輸入框:test 左輸入框:age,右輸入框:18 |
樣本輸出結果如下:
{
"name": "test",
"age": "18"
}