← Files CorezoidARCHIVED FILE
samples/create-actors.json
17.1 KB · Oct 10, 2026 · 06:12 UTC
{
"obj_type": 1,
"obj_id": 1663605,
"parent_id": 617263,
"title": "Actors",
"description": "",
"status": "active",
"params": [
{
"name": "count",
"type": "number",
"descr": "Number of actors to create",
"flags": ["required", "input"],
"regex": "",
"regex_error_text": ""
},
{
"name": "prefix_name",
"type": "string",
"descr": "Prefix for actor names",
"flags": [
"required",
"input"
],
"regex": ""
}
],
"ref_mask": true,
"conv_type": "process",
"scheme": {
"nodes": [
{
"id": "68307a3e513aa075cfa81edd",
"obj_type": 3,
"condition": {
"logics": [
{
"type": "api_rpc_reply",
"mode": "key_value",
"res_data": {
"description": "{{__conveyor_code_return_description__}}",
"result": "error"
},
"res_data_type": {
"description": "string",
"result": "string"
},
"throw_exception": true
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ede"
}
],
"semaphors": []
},
"title": "Process Shared Actor Error",
"description": "",
"x": 1288,
"y": 1066,
"extra": "{\"modeForm\":\"collapse\",\"icon\":\"\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ed7",
"obj_type": 0,
"condition": {
"logics": [
{
"type": "api_rpc",
"conv_id": 1660248,
"group": "all",
"err_node_id": "68307a3e513aa075cfa81ed8",
"extra": {
"objId": "{{objId}}",
"objType": "{{objType}}",
"request": "{{request}}"
},
"extra_type": {
"objId": "string",
"objType": "string",
"request": "array"
}
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81edb"
}
],
"semaphors": []
},
"title": "Share Actor",
"description": "",
"x": 980,
"y": 900,
"extra": "{\"modeForm\":\"expand\",\"icon\":\"\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ec3",
"obj_type": 0,
"condition": {
"logics": [
{
"type": "api_code",
"lang": "js",
"src": "// Initialize arrays to store created actors and access rules\ndata.created_actors = [];\ndata.access_rules = [];\n\n// Validate count parameter\nif (data.count <= 0) {\n throw new Error('Count must be greater than 0');\n}\n\n// Prepare data for actor creation\ndata.current_index = 0;\ndata.actor_data = {}; // Empty object for actor data\n\n// Prepare first actor creation\ndata.actor_title = data.prefix_name + data.current_index;\n",
"err_node_id": "68307a3e513aa075cfa81ec4"
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ec6"
}
],
"semaphors": []
},
"title": "Prepare Data",
"description": "",
"x": 984,
"y": 216,
"extra": "{\"modeForm\":\"expand\",\"icon\":\"\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81edb",
"obj_type": 0,
"condition": {
"logics": [
{
"type": "api_code",
"lang": "js",
"src": "// Increment counter\ndata.current_share_index++;\n\n// Check if we need to share more actors\nif (data.current_share_index < data.share_requests.length) {\n // Prepare next share request\n const nextShare = data.share_requests[data.current_share_index];\n data.objId = nextShare.objId;\n data.objType = nextShare.objType;\n data.request = nextShare.request;\n \n // Continue with sharing next actor\n data.continue_sharing = true;\n} else {\n // All actors shared, prepare final response\n data.continue_sharing = false;\n}\n",
"err_node_id": "68307a3e513aa075cfa81edd"
},
{
"type": "go_if_const",
"to_node_id": "68307a3e513aa075cfa81ed7",
"conditions": [
{
"cast": "boolean",
"const": "true",
"fun": "eq",
"param": "{{continue_sharing}}"
}
]
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81edf"
}
],
"semaphors": []
},
"title": "Process Shared Actor",
"description": "",
"x": 984,
"y": 1066,
"extra": "{\"modeForm\":\"expand\",\"icon\":\"\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ed8",
"obj_type": 3,
"condition": {
"logics": [
{
"type": "api_rpc_reply",
"mode": "key_value",
"res_data": {
"description": "{{__conveyor_api_return_description__}}: {{message}}",
"result": "error"
},
"res_data_type": {
"description": "string",
"result": "string"
},
"throw_exception": true
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ed9"
}
],
"semaphors": []
},
"title": "Share Actor Error",
"description": "",
"x": 1288,
"y": 926,
"extra": "{\"modeForm\":\"collapse\",\"icon\":\"\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ec6",
"obj_type": 0,
"condition": {
"logics": [
{
"type": "api_rpc",
"conv_id": 1660237,
"group": "all",
"err_node_id": "68307a3e513aa075cfa81ec8",
"extra": {
"actorData": "{{actor_data}}",
"formId": "{{form_id}}",
"title": "{{actor_title}}"
},
"extra_type": {
"actorData": "object",
"formId": "number",
"title": "string"
}
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ecc"
}
],
"semaphors": []
},
"title": "Create Actor",
"description": "",
"x": 988,
"y": 364,
"extra": "{\"modeForm\":\"expand\",\"icon\":\"\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ee0",
"obj_type": 2,
"condition": {
"logics": [],
"semaphors": []
},
"title": "Final",
"description": "",
"x": 1084,
"y": 1446,
"extra": "{\"modeForm\":\"collapse\",\"icon\":\"success\"}",
"options": "{\"save_task\":true}"
},
{
"id": "68307a3e513aa075cfa81ed9",
"obj_type": 2,
"condition": {
"logics": [],
"semaphors": []
},
"title": "",
"description": "",
"x": 1404,
"y": 926,
"extra": "{\"modeForm\":\"collapse\",\"icon\":\"error\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ede",
"obj_type": 2,
"condition": {
"logics": [],
"semaphors": []
},
"title": "",
"description": "",
"x": 1404,
"y": 1066,
"extra": "{\"modeForm\":\"collapse\",\"icon\":\"error\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ecc",
"obj_type": 0,
"condition": {
"logics": [
{
"type": "api_code",
"lang": "js",
"src": "// Store the created actor\ndata.created_actors.push(data.actor);\n\n// Increment counter\ndata.current_index++;\n\n// Check if we need to create more actors\nif (data.current_index < data.count) {\n // Prepare next actor creation\n data.actor_title = data.prefix_name + data.current_index;\n // Continue with creating next actor\n data.continue_creation = true;\n} else {\n // All actors created, prepare to share them\n data.continue_creation = false;\n}\n",
"err_node_id": "68307a3e513aa075cfa81ecf"
},
{
"type": "go_if_const",
"to_node_id": "68307a3e513aa075cfa81ec6",
"conditions": [
{
"cast": "boolean",
"const": "true",
"fun": "eq",
"param": "{{continue_creation}}"
}
]
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ed4"
}
],
"semaphors": []
},
"title": "Process Created Actor",
"description": "",
"x": 560,
"y": 504,
"extra": "{\"modeForm\":\"expand\",\"icon\":\"\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ed4",
"obj_type": 0,
"condition": {
"logics": [
{
"type": "api_code",
"lang": "js",
"src": "// Prepare data for sharing actors\ndata.share_requests = [];\n\n// Process each actor to create share requests\nfor (let i = 0; i < data.created_actors.length; i++) {\n const actor = data.created_actors[i];\n \n // Create share request for each actor with correct structure\n data.share_requests.push({\n \"objId\": actor.id,\n \"objType\": \"actor\",\n \"request\": [{\n \"action\": \"modify\",\n \"data\": {\n \"userId\": data.user_id,\n \"rights\": [\"read\", \"write\", \"delete\"],\n \"privs\": [\"create\", \"modify\", \"delete\", \"view\"]\n }\n }]\n });\n}\n\n// Prepare first share request\nif (data.share_requests.length > 0) {\n data.current_share_index = 0;\n data.objId = data.share_requests[0].objId;\n data.objType = data.share_requests[0].objType;\n data.request = data.share_requests[0].request;\n}\n",
"err_node_id": "68307a3e513aa075cfa81ed5"
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ed7"
}
],
"semaphors": []
},
"title": "Prepare Share Actors",
"description": "",
"x": 980,
"y": 736,
"extra": "{\"modeForm\":\"expand\",\"icon\":\"\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81edf",
"obj_type": 0,
"condition": {
"logics": [
{
"type": "api_rpc_reply",
"mode": "key_value",
"res_data": {
"actors": "{{created_actors}}",
"result": "success"
},
"res_data_type": {
"actors": "array",
"result": "string"
},
"throw_exception": false
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ee0"
}
],
"semaphors": []
},
"title": "Success Reply",
"description": "",
"x": 984,
"y": 1290,
"extra": "{\"modeForm\":\"expand\",\"icon\":\"\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ed5",
"obj_type": 3,
"condition": {
"logics": [
{
"type": "api_rpc_reply",
"mode": "key_value",
"res_data": {
"description": "{{__conveyor_code_return_description__}}",
"result": "error"
},
"res_data_type": {
"description": "string",
"result": "string"
},
"throw_exception": true
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ed6"
}
],
"semaphors": []
},
"title": "Prepare Share Actors Error",
"description": "",
"x": 1288,
"y": 672,
"extra": "{\"icon\":\"\",\"modeForm\":\"collapse\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ec8",
"obj_type": 3,
"condition": {
"logics": [
{
"type": "api_rpc_reply",
"mode": "key_value",
"res_data": {
"description": "{{__conveyor_api_return_description__}}: {{message}}",
"result": "error"
},
"res_data_type": {
"description": "string",
"result": "string"
},
"throw_exception": true
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ecb"
}
],
"semaphors": []
},
"title": "Create Actor Error",
"description": "",
"x": 1288,
"y": 392,
"extra": "{\"icon\":\"\",\"modeForm\":\"collapse\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ec5",
"obj_type": 2,
"condition": {
"logics": [],
"semaphors": []
},
"title": "",
"description": "",
"x": 1404,
"y": 252,
"extra": "{\"icon\":\"error\",\"modeForm\":\"collapse\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ec4",
"obj_type": 3,
"condition": {
"logics": [
{
"type": "api_rpc_reply",
"mode": "key_value",
"res_data": {
"description": "{{__conveyor_code_return_description__}}",
"result": "error"
},
"res_data_type": {
"description": "string",
"result": "string"
},
"throw_exception": true
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ec5"
}
],
"semaphors": []
},
"title": "Prepare Data Error",
"description": "",
"x": 1288,
"y": 252,
"extra": "{\"icon\":\"\",\"modeForm\":\"collapse\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ecb",
"obj_type": 2,
"condition": {
"logics": [],
"semaphors": []
},
"title": "",
"description": "",
"x": 1404,
"y": 392,
"extra": "{\"icon\":\"error\",\"modeForm\":\"collapse\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ed1",
"obj_type": 2,
"condition": {
"logics": [],
"semaphors": []
},
"title": "",
"description": "",
"x": 1404,
"y": 532,
"extra": "{\"icon\":\"error\",\"modeForm\":\"collapse\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ecf",
"obj_type": 3,
"condition": {
"logics": [
{
"type": "api_rpc_reply",
"mode": "key_value",
"res_data": {
"description": "{{__conveyor_code_return_description__}}",
"result": "error"
},
"res_data_type": {
"description": "string",
"result": "string"
},
"throw_exception": true
},
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ed1"
}
],
"semaphors": []
},
"title": "Process Created Actor Error",
"description": "",
"x": 1288,
"y": 532,
"extra": "{\"icon\":\"\",\"modeForm\":\"collapse\"}",
"options": null
},
{
"id": "68306a7982ba962670a4ba32",
"obj_type": 1,
"condition": {
"logics": [
{
"type": "go",
"to_node_id": "68307a3e513aa075cfa81ec3"
}
],
"semaphors": []
},
"title": "Start",
"description": "",
"x": 1084,
"y": 112,
"extra": "{\"icon\":\"\",\"modeForm\":\"collapse\"}",
"options": null
},
{
"id": "68307a3e513aa075cfa81ed6",
"obj_type": 2,
"condition": {
"logics": [],
"semaphors": []
},
"title": "",
"description": "",
"x": 1404,
"y": 672,
"extra": "{\"icon\":\"error\",\"modeForm\":\"collapse\"}",
"options": null
}
],
"web_settings": [
[],
[]
]
}
}
SHA-256: ed846d56f0a8714cade22960fdf8284c2c509de1a080d3bef58134e816f5af30