XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEWorkflow

【WinUI】XFE基于windows的工作流

公开
关注 0 Fork 0 Star 0
UTF-8
{
  "schemaVersion": 1,
  "id": "sample-basic-while-wired-condition",
  "name": "基础节点 · 连线判断条件循环",
  "description": "不填写变量表达式。condition 子图每轮读取 counter 并判断是否小于 3;body 递增并输出 1、2、3。所有数值通过数据连线传递,结束返回 3。",
  "enabled": false,
  "kind": "Graph",
  "graph": {
    "nodes": [
      {
        "id": "while-start",
        "capabilityId": "core.start",
        "name": "开始",
        "x": 160,
        "y": 180,
        "parameters": {}
      },
      {
        "id": "while-initialize",
        "capabilityId": "core.set",
        "name": "计数初始为零",
        "x": 620,
        "y": 180,
        "parameters": {
          "name": "counter",
          "value": 0
        }
      },
      {
        "id": "while-loop",
        "capabilityId": "core.while",
        "name": "每轮判断后循环",
        "x": 1080,
        "y": 180,
        "parameters": {
          "maxIterations": 10
        },
        "children": {
          "body": {
            "nodes": [
              {
                "id": "while-body-start",
                "capabilityId": "core.start",
                "name": "本轮开始",
                "x": 160,
                "y": 180,
                "parameters": {}
              },
              {
                "id": "while-increment",
                "capabilityId": "core.variable.increment",
                "name": "计数加一",
                "x": 620,
                "y": 180,
                "parameters": {
                  "name": "counter",
                  "amount": 1
                }
              },
              {
                "id": "while-log",
                "capabilityId": "core.log",
                "name": "输出当前计数",
                "x": 1080,
                "y": 180,
                "parameters": {}
              },
              {
                "id": "while-body-end",
                "capabilityId": "core.end",
                "name": "本轮返回",
                "x": 1540,
                "y": 180,
                "parameters": {}
              }
            ],
            "edges": [
              {
                "fromNode": "while-body-start",
                "fromPort": "next",
                "toNode": "while-increment",
                "toPort": "in",
                "kind": "Execution"
              },
              {
                "fromNode": "while-increment",
                "fromPort": "next",
                "toNode": "while-log",
                "toPort": "in",
                "kind": "Execution"
              },
              {
                "fromNode": "while-log",
                "fromPort": "next",
                "toNode": "while-body-end",
                "toPort": "in",
                "kind": "Execution"
              },
              {
                "fromNode": "while-increment",
                "fromPort": "value",
                "toNode": "while-log",
                "toPort": "message",
                "kind": "Data"
              },
              {
                "fromNode": "while-increment",
                "fromPort": "value",
                "toNode": "while-body-end",
                "toPort": "result",
                "kind": "Data"
              }
            ]
          },
          "condition": {
            "nodes": [
              {
                "id": "while-condition-start",
                "capabilityId": "core.start",
                "name": "判断开始",
                "x": 160,
                "y": 180,
                "parameters": {}
              },
              {
                "id": "while-counter-read",
                "capabilityId": "core.variable.get",
                "name": "读取当前计数",
                "x": 620,
                "y": 180,
                "parameters": {
                  "name": "counter"
                }
              },
              {
                "id": "while-counter-number",
                "capabilityId": "core.convert.number",
                "name": "转换为数字",
                "x": 1080,
                "y": 180,
                "parameters": {}
              },
              {
                "id": "while-compare",
                "capabilityId": "core.compare.lt",
                "name": "小于三",
                "x": 1540,
                "y": 180,
                "parameters": {
                  "right": 3
                }
              },
              {
                "id": "while-condition-end",
                "capabilityId": "core.end",
                "name": "返回布尔判断",
                "x": 2000,
                "y": 180,
                "parameters": {}
              }
            ],
            "edges": [
              {
                "fromNode": "while-condition-start",
                "fromPort": "next",
                "toNode": "while-counter-read",
                "toPort": "in",
                "kind": "Execution"
              },
              {
                "fromNode": "while-counter-read",
                "fromPort": "next",
                "toNode": "while-counter-number",
                "toPort": "in",
                "kind": "Execution"
              },
              {
                "fromNode": "while-counter-number",
                "fromPort": "next",
                "toNode": "while-compare",
                "toPort": "in",
                "kind": "Execution"
              },
              {
                "fromNode": "while-compare",
                "fromPort": "next",
                "toNode": "while-condition-end",
                "toPort": "in",
                "kind": "Execution"
              },
              {
                "fromNode": "while-counter-read",
                "fromPort": "value",
                "toNode": "while-counter-number",
                "toPort": "value",
                "kind": "Data"
              },
              {
                "fromNode": "while-counter-number",
                "fromPort": "value",
                "toNode": "while-compare",
                "toPort": "left",
                "kind": "Data"
              },
              {
                "fromNode": "while-compare",
                "fromPort": "value",
                "toNode": "while-condition-end",
                "toPort": "result",
                "kind": "Data"
              }
            ]
          }
        }
      },
      {
        "id": "while-final-read",
        "capabilityId": "core.variable.get",
        "name": "读取最终计数",
        "x": 1540,
        "y": 180,
        "parameters": {
          "name": "counter"
        }
      },
      {
        "id": "while-end",
        "capabilityId": "core.end",
        "name": "结束",
        "x": 2000,
        "y": 180,
        "parameters": {}
      }
    ],
    "edges": [
      {
        "fromNode": "while-start",
        "fromPort": "next",
        "toNode": "while-initialize",
        "toPort": "in",
        "kind": "Execution"
      },
      {
        "fromNode": "while-initialize",
        "fromPort": "next",
        "toNode": "while-loop",
        "toPort": "in",
        "kind": "Execution"
      },
      {
        "fromNode": "while-loop",
        "fromPort": "next",
        "toNode": "while-final-read",
        "toPort": "in",
        "kind": "Execution"
      },
      {
        "fromNode": "while-final-read",
        "fromPort": "next",
        "toNode": "while-end",
        "toPort": "in",
        "kind": "Execution"
      },
      {
        "fromNode": "while-final-read",
        "fromPort": "value",
        "toNode": "while-end",
        "toPort": "result",
        "kind": "Data"
      }
    ]
  },
  "inputs": [],
  "inputDefaults": {},
  "outputs": [],
  "variables": {},
  "pluginVersions": {},
  "triggers": [],
  "modifiedAt": "2026-10-13T00:00:00+08:00"
}