{
  "version": 0,
  "entry": "b1",
  "blocks": {
    "b1": {
      "type": "setVar",
      "inputs": {
        "name": "sourcePath",
        "value": "/input/source/report.txt"
      },
      "next": "b2"
    },
    "b2": {
      "type": "setVar",
      "inputs": {
        "name": "targetFolder",
        "value": {
          "type": "textJoin",
          "inputs": {
            "items": [
              {
                "type": "pathFolder",
                "inputs": {
                  "path": {
                    "var": "sourcePath"
                  }
                }
              },
              "/processed"
            ]
          }
        }
      },
      "next": "b3"
    },
    "b3": {
      "type": "setVar",
      "inputs": {
        "name": "targetPath",
        "value": {
          "type": "textJoin",
          "inputs": {
            "items": [
              {
                "var": "targetFolder"
              },
              "/",
              {
                "type": "pathFileName",
                "inputs": {
                  "path": {
                    "var": "sourcePath"
                  }
                }
              }
            ]
          }
        }
      },
      "next": "b4"
    },
    "b4": {
      "type": "createFolder",
      "inputs": {
        "path": {
          "var": "targetFolder"
        }
      },
      "next": "b5"
    },
    "b5": {
      "type": "copyFile",
      "inputs": {
        "from": {
          "var": "sourcePath"
        },
        "to": {
          "var": "targetPath"
        },
        "overwrite": true
      },
      "next": "b6"
    },
    "b6": {
      "type": "esConsoleLog",
      "inputs": {
        "message": {
          "type": "textJoin",
          "inputs": {
            "items": [
              "copiedTo=",
              {
                "var": "targetPath"
              }
            ]
          }
        }
      },
      "next": null
    }
  }
}
