DF_DO202601130001_workflow.json 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {
  2. "name": "DF_DO202601130001_仓库库存汇总表",
  3. "nodes": [
  4. {
  5. "parameters": {},
  6. "id": "trigger-001",
  7. "name": "Manual Trigger",
  8. "type": "n8n-nodes-base.manualTrigger",
  9. "typeVersion": 1,
  10. "position": [250, 300]
  11. },
  12. {
  13. "parameters": {
  14. "command": "=cd {{ $env.DATAOPS_PROJECT_ROOT || '/opt/dataops-platform' }} && python datafactory/scripts/DF_DO202601130001.py"
  15. },
  16. "id": "exec-001",
  17. "name": "Execute DataFlow Script",
  18. "type": "n8n-nodes-base.executeCommand",
  19. "typeVersion": 1,
  20. "position": [450, 300]
  21. },
  22. {
  23. "parameters": {
  24. "conditions": {
  25. "boolean": [
  26. {
  27. "value1": "={{ $json.exitCode === 0 }}",
  28. "value2": true
  29. }
  30. ]
  31. }
  32. },
  33. "id": "check-001",
  34. "name": "Check Result",
  35. "type": "n8n-nodes-base.if",
  36. "typeVersion": 1,
  37. "position": [650, 300]
  38. },
  39. {
  40. "parameters": {
  41. "functionCode": "return [{ json: { success: true, message: '仓库库存汇总表数据流程执行成功', workflow: 'DF_DO202601130001' } }];"
  42. },
  43. "id": "success-001",
  44. "name": "Success Response",
  45. "type": "n8n-nodes-base.function",
  46. "typeVersion": 1,
  47. "position": [850, 200]
  48. },
  49. {
  50. "parameters": {
  51. "functionCode": "return [{ json: { success: false, message: '仓库库存汇总表数据流程执行失败', error: $json.stderr || $json.stdout, workflow: 'DF_DO202601130001' } }];"
  52. },
  53. "id": "error-001",
  54. "name": "Error Response",
  55. "type": "n8n-nodes-base.function",
  56. "typeVersion": 1,
  57. "position": [850, 400]
  58. }
  59. ],
  60. "connections": {
  61. "Manual Trigger": {
  62. "main": [
  63. [
  64. {
  65. "node": "Execute DataFlow Script",
  66. "type": "main",
  67. "index": 0
  68. }
  69. ]
  70. ]
  71. },
  72. "Execute DataFlow Script": {
  73. "main": [
  74. [
  75. {
  76. "node": "Check Result",
  77. "type": "main",
  78. "index": 0
  79. }
  80. ]
  81. ]
  82. },
  83. "Check Result": {
  84. "main": [
  85. [
  86. {
  87. "node": "Success Response",
  88. "type": "main",
  89. "index": 0
  90. }
  91. ],
  92. [
  93. {
  94. "node": "Error Response",
  95. "type": "main",
  96. "index": 0
  97. }
  98. ]
  99. ]
  100. }
  101. },
  102. "active": false,
  103. "settings": {
  104. "executionOrder": "v1"
  105. },
  106. "versionId": "1",
  107. "meta": {
  108. "templateCredsSetupCompleted": false,
  109. "instanceId": "dataops-platform"
  110. },
  111. "tags": [
  112. {
  113. "createdAt": "2026-01-13T19:30:00.000Z",
  114. "updatedAt": "2026-01-13T19:30:00.000Z",
  115. "id": "2",
  116. "name": "数据流程"
  117. }
  118. ]
  119. }