{
  "productInfo" : {
    "company" : "HighByte",
    "product" : "IntelligenceHub",
    "version" : "4.0.1",
    "build" : "2024.11.5.4",
    "stage" : "Release"
  },
  "project" : {
    "version" : 9,
    "connections" : [ {
      "name" : "hb_opc",
      "uri" : "opc.tcp://52.10.6.4:49320",
      "tags" : [ "recacheTemplateReference" ],
      "writes" : {
        "flattenModeledValues" : false
      },
      "subscriptions" : {
        "subscriptionRate" : {
          "duration" : 1,
          "units" : "Seconds"
        }
      },
      "storeForward" : {
        "enabled" : false,
        "maxEntries" : 100,
        "waitOnFailureInterval" : {
          "duration" : 1,
          "units" : "Seconds"
        }
      },
      "settings" : {
        "security" : "None",
        "authentication" : {
          "type" : "Anonymous"
        },
        "connectTimeoutSeconds" : 5,
        "requestTimeoutMS" : 5000,
        "maxItemsPerRead" : 512,
        "maxItemsPerWrite" : 256,
        "sessionName" : ""
      }
    }, {
      "name" : "mqtt_local",
      "uri" : "mqtt://localhost:1885",
      "tags" : [ "recacheTemplateReference" ],
      "writes" : {
        "flattenModeledValues" : false
      },
      "subscriptions" : { },
      "storeForward" : {
        "enabled" : false,
        "maxEntries" : 100,
        "waitOnFailureInterval" : {
          "duration" : 1,
          "units" : "Seconds"
        }
      },
      "settings" : {
        "connectionTimeoutSeconds" : 10,
        "keepAliveSeconds" : 60,
        "requestTimeoutMS" : 5000,
        "cleanSession" : true,
        "ssl" : false,
        "redundantBrokers" : [ ],
        "inputDiscovery" : ""
      }
    }, {
      "name" : "projectApi",
      "uri" : "rest.client://projectApi",
      "tags" : [ "recacheTemplateReference" ],
      "writes" : {
        "flattenModeledValues" : false
      },
      "subscriptions" : { },
      "storeForward" : {
        "enabled" : false,
        "maxEntries" : 100,
        "waitOnFailureInterval" : {
          "duration" : 1,
          "units" : "Seconds"
        }
      },
      "settings" : {
        "authentication" : {
          "type" : "None",
          "options" : {
            "grantType" : "client_credentials",
            "clientAuthenticationType" : "body",
            "loginURL" : "http://0.0.0.0:45245/login",
            "username" : "projectApiUser",
            "password" : {
              "type" : "Encrypted",
              "value" : {
                "keyId" : "mrn0+fwGkmfxx4kisRgV/w==",
                "iv" : "8tX0CD4RrjmB2iS1ZsV8qg==",
                "ciphertext" : "4mcdx1PqmX9auH8B085f/Q=="
              }
            }
          }
        },
        "baseURL" : "http://0.0.0.0:45245"
      }
    }, {
      "name" : "sqliteTemplateTable",
      "uri" : "jdbc.sqlite://sqliteTemplateTable",
      "tags" : [ "recacheTemplateReference" ],
      "writes" : {
        "flattenModeledValues" : false
      },
      "subscriptions" : { },
      "storeForward" : {
        "enabled" : false,
        "maxEntries" : 100,
        "waitOnFailureInterval" : {
          "duration" : 1,
          "units" : "Seconds"
        }
      },
      "settings" : {
        "database" : "templateTable.db"
      }
    } ],
    "inputs" : [ {
      "name" : "ProductionLine_PLC_1",
      "connection" : "hb_opc",
      "type" : "opc.tcp",
      "qualifier" : {
        "namespaceIndex" : 2,
        "identifierType" : "String",
        "identifier" : "ProductionLine.PLC_1",
        "dataType" : "Auto",
        "type" : "Branch",
        "maxDepth" : 1
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      }
    }, {
      "name" : "ProductionLine_PLC_1_templated",
      "connection" : "hb_opc",
      "type" : "opc.tcp",
      "qualifier" : {
        "namespaceIndex" : 2,
        "identifierType" : "String",
        "identifier" : "ProductionLine.PLC_1.{{this.tag}}",
        "dataType" : "Auto",
        "type" : "Tag",
        "maxDepth" : 1,
        "cacheInterval" : {
          "units" : "Seconds",
          "duration" : 0
        },
        "ignoreBadQuality" : false,
        "browseVariableNodes" : false,
        "samplingInterval" : {
          "duration" : 0,
          "units" : "Seconds"
        },
        "isComplex" : true
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "name" : "ProductionLine_PLC_1_{{this.tag}}",
        "type" : "Dynamic",
        "reference" : "{{Connection.sqliteTemplateTable.read_templateTable}}"
      }
    }, {
      "name" : "login",
      "connection" : "projectApi",
      "type" : "rest.client",
      "qualifier" : {
        "acceptType" : "*/*",
        "method" : "POST",
        "contentType" : "application/json",
        "includeMetadata" : false,
        "endpointURL" : "/login",
        "body" : "{\"username\":\"administrator\",\"password\":\"\"}",
        "isFile" : false
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      }
    }, {
      "name" : "partialExport_pipeline",
      "connection" : "projectApi",
      "type" : "rest.client",
      "qualifier" : {
        "acceptType" : "*/*",
        "method" : "POST",
        "contentType" : "application/json",
        "includeMetadata" : false,
        "endpointURL" : "/v1/project/partial/export",
        "body" : "{\n  \"pipeline\": [\n    {\n      \"name\": \"templatedOpcTags\"\n    }\n  ]\n}",
        "isFile" : false,
        "header" : [ {
          "name" : "Authorization",
          "value" : "{{Connection.projectApi.login.token}}"
        } ]
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      }
    }, {
      "name" : "drop_stageNewTags",
      "connection" : "sqliteTemplateTable",
      "type" : "jdbc.sqlite",
      "qualifier" : {
        "query" : "DROP TABLE IF EXISTS stageNewTags",
        "index" : {
          "enabled" : false,
          "indexName" : "",
          "indexValue" : ""
        }
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      }
    }, {
      "name" : "drop_templateTable",
      "connection" : "sqliteTemplateTable",
      "type" : "jdbc.sqlite",
      "qualifier" : {
        "query" : "DROP TABLE IF EXISTS templateTable\n",
        "index" : {
          "enabled" : false,
          "indexName" : "",
          "indexValue" : ""
        }
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      }
    }, {
      "name" : "queryTemplateTableIfTagExists",
      "connection" : "sqliteTemplateTable",
      "type" : "jdbc.sqlite",
      "qualifier" : {
        "query" : "SELECT EXISTS (\nselect 1 from templateTable where tag = '{{this.checkTag}}'\n) as existsFlag;",
        "index" : {
          "enabled" : false,
          "indexName" : "",
          "indexValue" : ""
        }
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Static",
        "params" : [ {
          "name" : "checkKey",
          "pattern" : "\"Motor 3.HOA\""
        } ]
      }
    }, {
      "name" : "read_stageNewTags",
      "connection" : "sqliteTemplateTable",
      "type" : "jdbc.sqlite",
      "qualifier" : {
        "query" : "select * from \"stageNewTags\"",
        "index" : {
          "enabled" : false,
          "indexName" : "",
          "indexValue" : ""
        }
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      }
    }, {
      "name" : "read_templateTable",
      "connection" : "sqliteTemplateTable",
      "type" : "jdbc.sqlite",
      "qualifier" : {
        "query" : "select * from \"templateTable\"",
        "index" : {
          "enabled" : false,
          "indexName" : "",
          "indexValue" : ""
        }
      },
      "cacheLifetime" : {
        "enabled" : false
      },
      "template" : {
        "type" : "Off"
      }
    } ],
    "outputs" : [ ],
    "modeling" : {
      "models" : [ {
        "name" : "opcTag",
        "tags" : [ "recacheTemplateReference" ],
        "attributes" : [ {
          "attributeType" : "Internal",
          "name" : "value",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        }, {
          "attributeType" : "Internal",
          "name" : "_tagName",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        }, {
          "attributeType" : "Internal",
          "name" : "_tagQuality",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        }, {
          "attributeType" : "Internal",
          "name" : "_tagTimestamp",
          "nullable" : false,
          "required" : false,
          "array" : false,
          "internalType" : "Any"
        } ]
      } ],
      "instances" : [ ]
    },
    "conditions" : [ ],
    "functions" : [ ],
    "tags" : [ {
      "name" : "recacheTemplateReference"
    } ],
    "pipelines" : [ {
      "name" : "templatedOpcTags",
      "uri" : "pipeline",
      "tags" : [ "recacheTemplateReference" ],
      "settings" : {
        "inputStages" : [ "Model" ],
        "trackActivity" : true,
        "triggers" : [ {
          "name" : "EventTrigger",
          "config" : {
            "type" : ".TriggerEvent",
            "reference" : "{{Connection.hb_opc.ProductionLine_PLC_1_templated}}",
            "enabled" : true
          },
          "display" : {
            "position" : {
              "x" : -450,
              "y" : 0
            }
          }
        } ],
        "stages" : [ {
          "name" : "WriteNew",
          "outputs" : [ ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.mqtt_local}}",
            "ignoreResult" : false,
            "qualifier" : {
              "topic" : "{{this._tagName}}",
              "qos" : 0,
              "namedRoot" : false,
              "retained" : false,
              "breakupArrays" : false
            },
            "connectionType" : "mqtt"
          },
          "display" : {
            "position" : {
              "x" : 690,
              "y" : 0
            }
          }
        }, {
          "name" : "Model",
          "outputs" : [ "WriteNew" ],
          "config" : {
            "type" : ".ModelConfig",
            "model" : "opcTag",
            "objectName" : "{{event.name}}",
            "attributes" : [ {
              "name" : "value",
              "expression" : {
                "type" : "JavaScript",
                "expression" : "return event.value.value;"
              }
            }, {
              "name" : "_tagName",
              "expression" : {
                "type" : "JavaScript",
                "expression" : "return event.value._tagName.split('/').pop().replace(/\\./g, '/');"
              }
            }, {
              "name" : "_tagQuality",
              "expression" : {
                "type" : "JavaScript",
                "expression" : "return event.value._tagQuality;"
              }
            }, {
              "name" : "_tagTimestamp",
              "expression" : {
                "type" : "JavaScript",
                "expression" : "return event.value._tagTimestamp;"
              }
            } ]
          },
          "display" : {
            "position" : {
              "x" : 240,
              "y" : 0
            }
          }
        } ]
      }
    }, {
      "name" : "updateTemplateReference_initialStageUpdateRecache",
      "uri" : "pipeline",
      "description" : "Test write the following values for the detailed modes:\n0 -\"initialLoad\" - create table with current template values.\n1 - \"checkNewTags\" - check for new tag values and write to staging table.\n2 -\"updateTemplateTable\" - move new tags from staging table to template table.\n3 -\"simulatedHttpClient\" - Recache template reference by reimporting the relevant data logic pipeline.",
      "tags" : [ "recacheTemplateReference" ],
      "settings" : {
        "inputStages" : [ "Transform" ],
        "trackActivity" : true,
        "triggers" : [ {
          "name" : "PolledTrigger",
          "config" : {
            "type" : ".TriggerPolled",
            "enabled" : false,
            "interval" : {
              "duration" : 1,
              "units" : "Days"
            }
          },
          "display" : {
            "position" : {
              "x" : -450,
              "y" : 0
            }
          }
        } ],
        "stages" : [ {
          "name" : "browseTags",
          "outputs" : [ "elevateTagList" ],
          "config" : {
            "type" : ".ReadSourcesConfig",
            "keyReferences" : [ {
              "location" : "child",
              "key" : "Source1",
              "reference" : "{{Connection.hb_opc.ProductionLine_PLC_1}}"
            } ],
            "inputValueLocation" : "exclude",
            "inputValueKey" : "eventIn"
          },
          "display" : {
            "position" : {
              "x" : 1140,
              "y" : -337.5
            }
          }
        }, {
          "name" : "Flatten",
          "outputs" : [ "convertToArray" ],
          "config" : {
            "type" : ".FlattenConfig",
            "delimiter" : "."
          },
          "display" : {
            "position" : {
              "x" : 2040,
              "y" : -337.5
            }
          }
        }, {
          "name" : "convertToArray",
          "outputs" : [ "switch_loadInitialOrCheckNewTags" ],
          "config" : {
            "type" : ".TransformConfig",
            "transformExpression" : "let originalObject = event.value;\r\nconst convertedArray = Object.keys(originalObject).map(tag => ({\r\n    tag\r\n}));\r\nstage.setValue(convertedArray);"
          },
          "display" : {
            "position" : {
              "x" : 2490,
              "y" : -337.5
            }
          }
        }, {
          "name" : "updateData",
          "outputs" : [ "initialLoad" ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.sqliteTemplateTable}}",
            "qualifier" : {
              "table" : "templateTable",
              "writeType" : "upsert",
              "whereColumn" : "tag='{{this.tag}}'",
              "logAsJSON" : false,
              "createOption" : "create",
              "tableCacheInterval" : {
                "duration" : 1,
                "units" : "Hours"
              },
              "breakupArrays" : false,
              "filterList" : [ "_name", "_timestamp" ]
            },
            "qualifierExpression" : "",
            "ignoreResult" : false
          },
          "display" : {
            "position" : {
              "x" : 4290,
              "y" : -472.5
            }
          }
        }, {
          "name" : "replaceDummyData",
          "outputs" : [ "Breakup" ],
          "config" : {
            "type" : ".TransformConfig",
            "transformExpression" : "event.value = [\r\n\t{\r\n\t\t\"tag\": \"Tool_1\"\r\n\t},\r\n\t{\r\n\t\t\"tag\": \"Tool_1_Count\"\r\n\t},\r\n\t{\r\n\t\t\"tag\": \"Tool_2\"\r\n\t},\r\n\t{\r\n\t\t\"tag\": \"Tool_2_Count\"\r\n\t}\r\n];\r\nstage.setValue(event.value);"
          },
          "display" : {
            "position" : {
              "x" : 3390,
              "y" : -472.5
            }
          }
        }, {
          "name" : "elevateTagList",
          "outputs" : [ "Flatten" ],
          "config" : {
            "type" : ".TransformConfig",
            "transformExpression" : "stage.setValue(event.value.Source1);"
          },
          "display" : {
            "position" : {
              "x" : 1590,
              "y" : -337.5
            }
          }
        }, {
          "name" : "initialLoad",
          "outputs" : [ "getRestToken1" ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.mqtt_local}}",
            "qualifier" : {
              "topic" : "initialLoad/{{this.tag}}",
              "qos" : 0,
              "namedRoot" : false,
              "retained" : false,
              "breakupArrays" : false
            },
            "qualifierExpression" : "",
            "ignoreResult" : false,
            "connectionType" : "mqtt"
          },
          "display" : {
            "position" : {
              "x" : 4740,
              "y" : -472.5
            }
          }
        }, {
          "name" : "Breakup",
          "outputs" : [ "updateData" ],
          "config" : {
            "type" : ".BreakupConfig",
            "breakupType" : "array"
          },
          "display" : {
            "position" : {
              "x" : 3840,
              "y" : -472.5
            }
          }
        }, {
          "name" : "switch_loadInitialOrCheckNewTags",
          "outputs" : [ ],
          "config" : {
            "type" : ".SwitchConfig",
            "switchCases" : [ {
              "expression" : "return Boolean(event.metadata.inputMode===\"initialLoad\") || Boolean(event.metadata.inputMode===0) ;",
              "outputs" : [ "replaceDummyData" ],
              "description" : "Initial loading of template table"
            }, {
              "expression" : "return Boolean(event.metadata.inputMode===\"checkNewTags\") || Boolean(event.metadata.inputMode===1) || Boolean(JSON.stringify(event.metadata.inputMode)==='{}');",
              "outputs" : [ "Breakup_1" ],
              "description" : "Polled monitoring of new tags"
            }, {
              "expression" : "return Boolean(event.metadata.inputMode===\"updateTable\") || Boolean(event.metadata.inputMode===2) ;",
              "outputs" : [ ],
              "description" : "Move new tags from stageNewTable to templateTable"
            }, {
              "expression" : "return true;",
              "outputs" : [ "catchDefaultswitch_loadInitialOrCheckNewTags" ],
              "description" : "default"
            } ],
            "evaluationType" : "onFirst"
          },
          "display" : {
            "position" : {
              "x" : 2940,
              "y" : -337.5
            }
          }
        }, {
          "name" : "Transform",
          "outputs" : [ "switch_browseNamespaceOrLoadStagedTags" ],
          "config" : {
            "type" : ".TransformConfig",
            "transformExpression" : "stage.setMetadata(\"inputMode\",event.value);"
          },
          "display" : {
            "position" : {
              "x" : 240,
              "y" : 0
            }
          }
        }, {
          "name" : "Read",
          "outputs" : [ "Filter" ],
          "config" : {
            "type" : ".ReadSourcesConfig",
            "keyReferences" : [ {
              "location" : "child",
              "key" : "checkTagExists",
              "reference" : "{{Connection.sqliteTemplateTable.queryTemplateTableIfTagExists(checkTag={{event.value.tag}})}}"
            } ],
            "inputValueLocation" : "inline",
            "inputValueKey" : "eventIn"
          },
          "display" : {
            "position" : {
              "x" : 3840,
              "y" : -270
            }
          }
        }, {
          "name" : "Breakup_1",
          "outputs" : [ "Read" ],
          "config" : {
            "type" : ".BreakupConfig",
            "breakupType" : "array"
          },
          "display" : {
            "position" : {
              "x" : 3390,
              "y" : -270
            }
          }
        }, {
          "name" : "mqtt_stageNewTags",
          "outputs" : [ ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.mqtt_local}}",
            "qualifier" : {
              "qos" : 0,
              "namedRoot" : false,
              "retained" : false,
              "topic" : "stageNewTags/{{this.tag}}",
              "breakupArrays" : false
            },
            "qualifierExpression" : "",
            "ignoreResult" : false
          },
          "display" : {
            "position" : {
              "x" : 5190,
              "y" : -67.5
            }
          }
        }, {
          "name" : "sqlite_stageNewTags",
          "outputs" : [ ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.sqliteTemplateTable}}",
            "qualifier" : {
              "table" : "stageNewTags",
              "writeType" : "upsert",
              "whereColumn" : "tag='{{this.tag}}'",
              "logAsJSON" : false,
              "createOption" : "create",
              "tableCacheInterval" : {
                "duration" : 1,
                "units" : "Hours"
              },
              "breakupArrays" : false,
              "filterList" : [ "_timestamp", "_name" ]
            },
            "qualifierExpression" : "",
            "ignoreResult" : false,
            "connectionType" : "jdbc.sqlite"
          },
          "display" : {
            "position" : {
              "x" : 5190,
              "y" : -202.5
            }
          }
        }, {
          "name" : "Switch_1",
          "outputs" : [ ],
          "config" : {
            "type" : ".SwitchConfig",
            "switchCases" : [ {
              "expression" : "return Boolean(event.metadata.filtered.checkTagExists[0].existsFlag===1)",
              "outputs" : [ "mqtt_existingTags" ],
              "description" : "Tag exists"
            }, {
              "expression" : "return Boolean(event.metadata.filtered.checkTagExists[0].existsFlag===0)",
              "outputs" : [ "sqlite_stageNewTags", "mqtt_stageNewTags" ],
              "description" : "New tag"
            }, {
              "expression" : "return true",
              "outputs" : [ ],
              "description" : "default"
            } ],
            "evaluationType" : "onFirst"
          },
          "display" : {
            "position" : {
              "x" : 4740,
              "y" : -270
            }
          }
        }, {
          "name" : "mqtt_existingTags",
          "outputs" : [ ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.mqtt_local}}",
            "qualifier" : {
              "topic" : "existingTags/{{this.tag}}",
              "qos" : 0,
              "namedRoot" : false,
              "retained" : false,
              "breakupArrays" : false
            },
            "qualifierExpression" : "",
            "ignoreResult" : false
          },
          "display" : {
            "position" : {
              "x" : 5190,
              "y" : -337.5
            }
          }
        }, {
          "name" : "Filter",
          "outputs" : [ "Switch_1" ],
          "config" : {
            "type" : ".AttributeFilterConfig",
            "filterOption" : "include",
            "attributeList" : [ "tag" ],
            "retainAsMetadata" : true,
            "metadataKey" : "filtered"
          },
          "display" : {
            "position" : {
              "x" : 4290,
              "y" : -270
            }
          }
        }, {
          "name" : "catchDefaultswitch_loadInitialOrCheckNewTags",
          "outputs" : [ ],
          "config" : {
            "type" : ".TransformConfig",
            "transformExpression" : "stage.setValue(event.value);"
          },
          "display" : {
            "position" : {
              "x" : 3390,
              "y" : -135
            }
          }
        }, {
          "name" : "switch_browseNamespaceOrLoadStagedTags",
          "outputs" : [ ],
          "config" : {
            "type" : ".SwitchConfig",
            "switchCases" : [ {
              "expression" : "return Boolean(event.metadata.inputMode===\"initialLoad\") || Boolean(event.metadata.inputMode===0) || Boolean(event.metadata.inputMode===\"checkNewTags\") || Boolean(event.metadata.inputMode===1) || Boolean(JSON.stringify(event.metadata.inputMode)==='{}');",
              "outputs" : [ "browseTags" ],
              "description" : "Scan namespace"
            }, {
              "expression" : "return Boolean(event.metadata.inputMode===\"updateTemplateTable\") || Boolean(event.metadata.inputMode===2) ;",
              "outputs" : [ "getStagedTags" ],
              "description" : "Move stageNewTags to templateTable"
            }, {
              "expression" : "return Boolean(event.metadata.inputMode===\"simulatedHttpClient\") || Boolean(event.metadata.inputMode===3) ;",
              "outputs" : [ "getRestToken" ],
              "description" : "Recache template reference"
            }, {
              "expression" : "return true;",
              "outputs" : [ "catchDefaultSwitch_browseNamespaceOrLoadStagedTags" ],
              "description" : "default"
            } ],
            "evaluationType" : "onFirst"
          },
          "display" : {
            "position" : {
              "x" : 690,
              "y" : 0
            }
          }
        }, {
          "name" : "getStagedTags",
          "outputs" : [ "elevate_stagedTags" ],
          "config" : {
            "type" : ".ReadSourcesConfig",
            "keyReferences" : [ {
              "location" : "child",
              "key" : "stagedTags",
              "reference" : "{{Connection.sqliteTemplateTable.read_stageNewTags}}"
            } ],
            "inputValueLocation" : "exclude",
            "inputValueKey" : "eventIn"
          },
          "display" : {
            "position" : {
              "x" : 1140,
              "y" : -202.5
            }
          }
        }, {
          "name" : "WriteNew",
          "outputs" : [ "Breakup_2" ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.sqliteTemplateTable}}",
            "qualifier" : {
              "table" : "templateTable",
              "writeType" : "upsert",
              "whereColumn" : "tag='{{this.tag}}'",
              "logAsJSON" : false,
              "createOption" : "off",
              "tableCacheInterval" : {
                "duration" : 1,
                "units" : "Hours"
              },
              "breakupArrays" : false
            },
            "qualifierExpression" : "",
            "ignoreResult" : false
          },
          "display" : {
            "position" : {
              "x" : 2040,
              "y" : -202.5
            }
          }
        }, {
          "name" : "mqtt_uploadedTags",
          "outputs" : [ ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.mqtt_local}}",
            "qualifier" : {
              "topic" : "uploadedTags/{{this.tag}}",
              "qos" : 0,
              "namedRoot" : false,
              "retained" : false,
              "breakupArrays" : false
            },
            "qualifierExpression" : "",
            "ignoreResult" : false
          },
          "display" : {
            "position" : {
              "x" : 2940,
              "y" : -202.5
            }
          }
        }, {
          "name" : "Breakup_2",
          "outputs" : [ "mqtt_uploadedTags" ],
          "config" : {
            "type" : ".BreakupConfig",
            "breakupType" : "array"
          },
          "display" : {
            "position" : {
              "x" : 2490,
              "y" : -202.5
            }
          }
        }, {
          "name" : "elevate_stagedTags",
          "outputs" : [ "WriteNew" ],
          "config" : {
            "type" : ".TransformConfig",
            "transformExpression" : "stage.setValue(event.value.stagedTags);"
          },
          "display" : {
            "position" : {
              "x" : 1590,
              "y" : -202.5
            }
          }
        }, {
          "name" : "catchDefaultSwitch_browseNamespaceOrLoadStagedTags",
          "outputs" : [ ],
          "config" : {
            "type" : ".TransformConfig",
            "transformExpression" : "stage.setValue(event.value);"
          },
          "display" : {
            "position" : {
              "x" : 1140,
              "y" : 67.5
            }
          }
        }, {
          "name" : "getPipelineExport",
          "outputs" : [ "restPIpelineImport" ],
          "config" : {
            "type" : ".ReadSourcesConfig",
            "keyReferences" : [ {
              "location" : "inline",
              "key" : "Source1",
              "reference" : "{{Connection.projectApi.partialExport_pipeline}}"
            } ],
            "inputValueLocation" : "exclude",
            "inputValueKey" : "eventIn"
          },
          "display" : {
            "position" : {
              "x" : 2040,
              "y" : -67.5
            }
          }
        }, {
          "name" : "restPIpelineImport",
          "outputs" : [ ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.projectApi}}",
            "qualifier" : {
              "endpointURL" : "/v1/project/partial/import",
              "method" : "POST",
              "bodyType" : "defaultjson",
              "breakupArrays" : false,
              "filterList" : [ "_timestamp" ],
              "header" : [ {
                "value" : "{{event.metadata.restToken}}",
                "name" : "Authorization"
              } ]
            },
            "qualifierExpression" : "",
            "ignoreResult" : false,
            "connectionType" : "rest.client"
          },
          "display" : {
            "position" : {
              "x" : 2490,
              "y" : -67.5
            }
          }
        }, {
          "name" : "getRestToken",
          "outputs" : [ "putRestTokenInMetadata" ],
          "config" : {
            "type" : ".ReadSourcesConfig",
            "keyReferences" : [ {
              "location" : "inline",
              "key" : "Source1",
              "reference" : "{{Connection.projectApi.login}}"
            } ],
            "inputValueLocation" : "exclude",
            "inputValueKey" : "eventIn"
          },
          "display" : {
            "position" : {
              "x" : 1140,
              "y" : -67.5
            }
          }
        }, {
          "name" : "putRestTokenInMetadata",
          "outputs" : [ "getPipelineExport" ],
          "config" : {
            "type" : ".TransformConfig",
            "transformExpression" : "stage.setMetadata(\"restToken\",event.value.token)"
          },
          "display" : {
            "position" : {
              "x" : 1590,
              "y" : -67.5
            }
          }
        }, {
          "name" : "getPipelineExport1",
          "outputs" : [ "restPipelineImport1" ],
          "config" : {
            "type" : ".ReadSourcesConfig",
            "keyReferences" : [ {
              "location" : "inline",
              "reference" : "{{Connection.projectApi.partialExport_pipeline}}",
              "key" : "Source1"
            } ],
            "inputValueLocation" : "exclude",
            "inputValueKey" : "eventIn"
          },
          "display" : {
            "position" : {
              "x" : 6090,
              "y" : -472.5
            }
          }
        }, {
          "name" : "restPipelineImport1",
          "outputs" : [ ],
          "config" : {
            "type" : ".DynamicWriteConfig",
            "failureOutputs" : [ ],
            "connectionReference" : "{{Connection.projectApi}}",
            "ignoreResult" : false,
            "qualifier" : {
              "endpointURL" : "/v1/project/partial/import",
              "method" : "POST",
              "bodyType" : "defaultjson",
              "breakupArrays" : false,
              "header" : [ {
                "name" : "Authorization",
                "value" : "{{event.metadata.restToken}}"
              } ]
            },
            "connectionType" : "rest.client"
          },
          "display" : {
            "position" : {
              "x" : 6540,
              "y" : -475.0357837320559
            }
          }
        }, {
          "name" : "getRestToken1",
          "outputs" : [ "putRestTokenInMetadata1" ],
          "config" : {
            "type" : ".ReadSourcesConfig",
            "keyReferences" : [ {
              "location" : "inline",
              "reference" : "{{Connection.projectApi.login}}",
              "key" : "Source1"
            } ],
            "inputValueLocation" : "exclude",
            "inputValueKey" : "eventIn"
          },
          "display" : {
            "position" : {
              "x" : 5190,
              "y" : -472.5
            }
          }
        }, {
          "name" : "putRestTokenInMetadata1",
          "outputs" : [ "getPipelineExport1" ],
          "config" : {
            "type" : ".TransformConfig",
            "transformExpression" : "stage.setMetadata(\"restToken\",event.value.token)"
          },
          "display" : {
            "position" : {
              "x" : 5640,
              "y" : -472.5
            }
          }
        } ]
      }
    } ],
    "namespace" : [ ]
  },
  "network" : {
    "groups" : [ ],
    "hubs" : [ ]
  }
}