通用参数

接口参数

字段 类型 必选 描述
template_id string 模板ID
  1. "result": true,
  2. "data": {
  3. "category": "Other",
  4. "edit_time": "2018-04-27 16:24:24 +0800",
  5. "create_time": "2018-04-16 21:43:15 +0800",
  6. "name": "new20180416213944",
  7. "creator": "admin",
  8. "pipeline_tree": {
  9. "activities": {
  10. "631b6576cc5dfbdcaa4f510ce88a7e67": {
  11. "outgoing": "44ab36ebf4cf119edaf2d20401da87e4",
  12. "incoming": "fb2f3a8b533ca5c67e2440b4164f7632",
  13. "name": "节点_1",
  14. "error_ignorable": false,
  15. "component": {
  16. "code": "job_fast_execute_script",
  17. "data": {
  18. "account": {
  19. "hook": false,
  20. "value": "root"
  21. },
  22. "ip_list": {
  23. "hook": false,
  24. "value": "127.0.0.1"
  25. },
  26. "script_timeout": {
  27. "hook": true,
  28. "value": "${script_timeout}"
  29. },
  30. "content": {
  31. "hook": false,
  32. "value": "${content}"
  33. },
  34. "script_param": {
  35. "hook": false,
  36. "value": "${params}"
  37. },
  38. "script_type": {
  39. "hook": true,
  40. }
  41. }
  42. },
  43. "optional": false,
  44. "type": "ServiceActivity",
  45. "id": "631b6576cc5dfbdcaa4f510ce88a7e67",
  46. "loop": null
  47. },
  48. "end_event": {
  49. "type": "EmptyEndEvent",
  50. "outgoing": "",
  51. "incoming": "44ab36ebf4cf119edaf2d20401da87e4",
  52. "id": "60c81e383d048d8a3c574d3436e1b82c",
  53. "name": ""
  54. },
  55. "outputs": [],
  56. "flows": {
  57. "fb2f3a8b533ca5c67e2440b4164f7632": {
  58. "is_default": false,
  59. "source": "48afea1016ab70ee37179fa0eb1e1a14",
  60. "id": "fb2f3a8b533ca5c67e2440b4164f7632",
  61. "target": "631b6576cc5dfbdcaa4f510ce88a7e67"
  62. },
  63. "44ab36ebf4cf119edaf2d20401da87e4": {
  64. "is_default": false,
  65. "source": "631b6576cc5dfbdcaa4f510ce88a7e67",
  66. "id": "44ab36ebf4cf119edaf2d20401da87e4",
  67. "target": "60c81e383d048d8a3c574d3436e1b82c"
  68. }
  69. },
  70. "start_event": {
  71. "type": "EmptyStartEvent",
  72. "outgoing": "fb2f3a8b533ca5c67e2440b4164f7632",
  73. "incoming": "",
  74. "id": "48afea1016ab70ee37179fa0eb1e1a14",
  75. "name": ""
  76. },
  77. "constants": {
  78. "${script_type}": {
  79. "source_tag": "job_fast_execute_script.script_type",
  80. "source_info": {
  81. "631b6576cc5dfbdcaa4f510ce88a7e67": [
  82. "script_type"
  83. ]
  84. },
  85. "name": "脚本类型",
  86. "index": 0,
  87. "custom_type": "radio",
  88. "value": "4",
  89. "show_type": "show",
  90. "key": "${script_type}",
  91. "validation": "^.*$",
  92. "desc": ""
  93. "${content}": {
  94. "source_tag": "",
  95. "source_info": {},
  96. "name": "内容",
  97. "index": 2,
  98. "custom_type": "textarea",
  99. "value": "",
  100. "show_type": "show",
  101. "source_type": "custom",
  102. "key": "${content}",
  103. "desc": ""
  104. },
  105. "${script_timeout}": {
  106. "source_tag": "job_fast_execute_script.script_timeout",
  107. "source_info": {
  108. "631b6576cc5dfbdcaa4f510ce88a7e67": [
  109. "script_timeout"
  110. ]
  111. },
  112. "name": "超时时间",
  113. "index": 1,
  114. "custom_type": "input",
  115. "value": "",
  116. "show_type": "show",
  117. "source_type": "component_inputs",
  118. "key": "${script_timeout}",
  119. "validation": "^.*$",
  120. "desc": ""
  121. },
  122. "${params}": {
  123. "source_tag": "",
  124. "source_info": {},
  125. "name": "参数",
  126. "index": 3,
  127. "custom_type": "input",
  128. "value": "",
  129. "show_type": "show",
  130. "source_type": "custom",
  131. "key": "${params}",
  132. "desc": ""
  133. }
  134. },
  135. "gateways": {}
  136. },
  137. "id": 30,
  138. "editor": "admin"
  139. },

data

字段 类型 描述
id int 模板ID
name string 模板名称
category string 模板分类,分类信息见下面说明
creator string 模板创建人
create_time string 模板创建时间
editor string 或者 null 模板编辑人
edit_time string 模板最新编辑时间
pipeline_tree dict 模板任务树信息,详细信息见下面说明

data.category

data.pipeline_tree

字段 类型 描述
start_event dict 开始节点信息
end_event dict 结束节点信息
activities dict 任务节点(标准插件和子流程)信息
gateways dict 网关节点(并行网关、分支网关和汇聚网关)信息
flows dict 顺序流(节点连线)信息
constants dict 全局变量信息,详情见下面
outputs list 模板输出信息,标记 constants 中的输出字段

data.pipeline_tree.constants KEY

全局变量 KEY,${key} 格式

data.pipeline_tree.constants VALUE