{
	"ProcessTemplates": [
		{
			"Name": "MicrosoftSQL to Oracle -  Batch load",
			"Modified": "2024-07-22T11:29:26.4383386",
			"Modifier": "janne.pennanen@frends.com",
			"Tags": [
				"Oracle",
				"MicrosoftSQL"
			],
			"TemplateProcessTags": [],
			"Description": "This template process loads the contents of a table from a MicrosoftSQL database into an Oracle DB table using a user-defined chunk size.",
			"Version": 1,
			"UniqueIdentifier": "7021d029-c7cd-45cf-89fd-eb9145d68c88",
			"ProcessVariablesJson": "{\"OracleConnectionString\":{\"Value\":\"\\\"SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));uid=myUsername;pwd=myPassword;\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The connection string for Oracle.\"},\"ColumnNames\":{\"Value\":\"\\\"column1, column2, column3\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The names of the columns, in both MicrosoftSQL and Oracle, whose data should be handled, separated with a comma and a space. For example: firstname, lastname, address\"},\"OracleTimestampColumn\":{\"Value\":\"\\\"updated_timestamp\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The name of the column in the Oracle database whose values specify the last update time of each row. for example \\\"updated\\\" (without the double quotes).\"},\"OracleTableName\":{\"Value\":\"\\\"myTable\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The name of the table in the Oracle database that data should be inserted into.\"},\"OracleSchema\":{\"Value\":\"\\\"MY_SCHEMA\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The desired schema in Oracle.\"},\"ChunkSize\":{\"Value\":\"50\",\"IsSecret\":false,\"Mode\":\"integer\",\"Description\":\"The amount of rows that should be inserted into Oracle at once.\"},\"MicrosoftSqlConnectionString\":{\"Value\":\"\\\"Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The connection string for MicrosoftSQL.\"},\"MicrosoftSqlTableName\":{\"Value\":\"\\\"myTable\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The name of the table in the Microsoft SQL database to be queried.\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "MicrosoftSQL to Oracle -  Batch load",
					"Modified": "2024-07-22T11:29:26.4383386",
					"Modifier": "janne.pennanen@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This template process loads the contents of a table from a MicrosoftSQL database into an Oracle DB table using a user-defined chunk size.",
					"Version": 1,
					"UniqueIdentifier": "fd1a522a-be01-4390-93da-80e4f3c42e83",
					"GraphJson": null,
					"Bpmn": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"sample-diagram\" targetNamespace=\"http://bpmn.io/schema/bpmn\" xsi:schemaLocation=\"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd\"><bpmn2:process id=\"Process_1\" isExecutable=\"false\"><bpmn2:startEvent id=\"StartEvent_1\" name=\"Manual\"><bpmn2:outgoing>Flow_1phnta1</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_1xscqf8\" name=\"Fetch data from MicrosoftSQL\"><bpmn2:incoming>Flow_1phnta1</bpmn2:incoming><bpmn2:outgoing>Flow_0w8gd11</bpmn2:outgoing><bpmn2:property id=\"Property_1j5hual\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_1h62npz\"><bpmn2:sourceRef>DataStoreReference_04vqx4a</bpmn2:sourceRef><bpmn2:targetRef>Property_1j5hual</bpmn2:targetRef></bpmn2:dataInputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_1phnta1\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_1xscqf8\" /><bpmn2:scriptTask id=\"Activity_19baivf\" name=\"Create insert statements for Oracle\"><bpmn2:incoming>Flow_1mienrh</bpmn2:incoming><bpmn2:outgoing>Flow_19obx3f</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:exclusiveGateway id=\"Gateway_1d4u0qm\" name=\"Data fetched successfully?\" default=\"Flow_1618o2r\"><bpmn2:incoming>Flow_0w8gd11</bpmn2:incoming><bpmn2:outgoing>Flow_1mienrh</bpmn2:outgoing><bpmn2:outgoing>Flow_1618o2r</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_0w8gd11\" sourceRef=\"Activity_1xscqf8\" targetRef=\"Gateway_1d4u0qm\" /><bpmn2:sequenceFlow id=\"Flow_1mienrh\" name=\"yes\" sourceRef=\"Gateway_1d4u0qm\" targetRef=\"Activity_19baivf\" /><bpmn2:subProcess id=\"Activity_134k9wr\" name=\"Insert data into Oracle in chunks\"><bpmn2:incoming>Flow_0p2xrt3</bpmn2:incoming><bpmn2:outgoing>Flow_0abcn0r</bpmn2:outgoing><bpmn2:multiInstanceLoopCharacteristics isSequential=\"true\" /><bpmn2:startEvent id=\"Event_04cpsuj\"><bpmn2:outgoing>Flow_03heoqe</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_10pcjud\" name=\"Insert chunk into Oracle\"><bpmn2:incoming>Flow_03heoqe</bpmn2:incoming><bpmn2:outgoing>Flow_149bcka</bpmn2:outgoing><bpmn2:dataOutputAssociation id=\"DataOutputAssociation_0sn06j3\"><bpmn2:targetRef>DataStoreReference_0hezpzn</bpmn2:targetRef></bpmn2:dataOutputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_03heoqe\" sourceRef=\"Event_04cpsuj\" targetRef=\"Activity_10pcjud\" /><bpmn2:exclusiveGateway id=\"Gateway_1nq0lbr\" name=\"Insertion successful?\" default=\"Flow_0li6dbw\"><bpmn2:incoming>Flow_149bcka</bpmn2:incoming><bpmn2:outgoing>Flow_1lixxyy</bpmn2:outgoing><bpmn2:outgoing>Flow_0li6dbw</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_149bcka\" sourceRef=\"Activity_10pcjud\" targetRef=\"Gateway_1nq0lbr\" /><bpmn2:endEvent id=\"Event_1jr2wxz\" name=\"Move to the next chunk\"><bpmn2:incoming>Flow_1lixxyy</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_1lixxyy\" name=\"yes\" sourceRef=\"Gateway_1nq0lbr\" targetRef=\"Event_1jr2wxz\" /><bpmn2:endEvent id=\"Event_1tenrb1\" name=\"Add error to error variable and move to the next chunk\"><bpmn2:incoming>Flow_0li6dbw</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_0li6dbw\" name=\"no\" sourceRef=\"Gateway_1nq0lbr\" targetRef=\"Event_1tenrb1\" /><bpmn2:dataStoreReference id=\"DataStoreReference_0hezpzn\" name=\"Oracle database\" /></bpmn2:subProcess><bpmn2:businessRuleTask id=\"Activity_1jjkfvf\" name=\"Set previous sync time into cache\"><bpmn2:incoming>Flow_0abcn0r</bpmn2:incoming><bpmn2:outgoing>Flow_0rxjn5m</bpmn2:outgoing></bpmn2:businessRuleTask><bpmn2:sequenceFlow id=\"Flow_0abcn0r\" sourceRef=\"Activity_134k9wr\" targetRef=\"Activity_1jjkfvf\" /><bpmn2:intermediateThrowEvent id=\"Event_0xwfyxd\" name=\"Throw exception if data couldn&#39;t be fetched from MicrosoftSQL\"><bpmn2:incoming>Flow_1618o2r</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_1618o2r\" name=\"no\" sourceRef=\"Gateway_1d4u0qm\" targetRef=\"Event_0xwfyxd\" /><bpmn2:scriptTask id=\"Activity_0hc8s8p\" name=\"Initialize error variable\"><bpmn2:incoming>Flow_19obx3f</bpmn2:incoming><bpmn2:outgoing>Flow_0p2xrt3</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_19obx3f\" sourceRef=\"Activity_19baivf\" targetRef=\"Activity_0hc8s8p\" /><bpmn2:sequenceFlow id=\"Flow_0p2xrt3\" sourceRef=\"Activity_0hc8s8p\" targetRef=\"Activity_134k9wr\" /><bpmn2:endEvent id=\"Event_1n4aytz\" name=\"Process complete, return and print potential errors\"><bpmn2:incoming>Flow_0rxjn5m</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_0rxjn5m\" sourceRef=\"Activity_1jjkfvf\" targetRef=\"Event_1n4aytz\" /><bpmn2:dataStoreReference id=\"DataStoreReference_04vqx4a\" name=\"MicrosoftSQL database\" /><bpmn2:group id=\"Group_1jse258\" categoryValueRef=\"CategoryValue_1i1otby\" /><bpmn2:textAnnotation id=\"TextAnnotation_156mv0e\"><bpmn2:text>The total number of rows is split into chunks and an insert statement is created for each one.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_04kwu8l\" sourceRef=\"Activity_19baivf\" targetRef=\"TextAnnotation_156mv0e\" /><bpmn2:textAnnotation id=\"TextAnnotation_0zlensq\"><bpmn2:text>This value can be used for keeping the two tables synchronized using another process.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_1o8eups\" sourceRef=\"Activity_1jjkfvf\" targetRef=\"TextAnnotation_0zlensq\" /></bpmn2:process><bpmn2:category id=\"Category_1bs582f\"><bpmn2:categoryValue id=\"CategoryValue_1i1otby\" value=\"Fetch data from MicrosoftSQL and create insert statements\" /></bpmn2:category><bpmndi:BPMNDiagram id=\"BPMNDiagram_1\"><bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Process_1\"><bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" bpmnElement=\"StartEvent_1\"><dc:Bounds x=\"412\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1xscqf8_di\" bpmnElement=\"Activity_1xscqf8\"><dc:Bounds x=\"510\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_19baivf_di\" bpmnElement=\"Activity_19baivf\"><dc:Bounds x=\"800\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_1d4u0qm_di\" bpmnElement=\"Gateway_1d4u0qm\" isMarkerVisible=\"true\"><dc:Bounds x=\"675\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"667\" y=\"196\" width=\"65\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_134k9wr_di\" bpmnElement=\"Activity_134k9wr\" isExpanded=\"true\"><dc:Bounds x=\"1110\" y=\"20\" width=\"520\" height=\"460\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_04cpsuj_di\" bpmnElement=\"Event_04cpsuj\"><dc:Bounds x=\"1150\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_10pcjud_di\" bpmnElement=\"Activity_10pcjud\"><dc:Bounds x=\"1240\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_1nq0lbr_di\" bpmnElement=\"Gateway_1nq0lbr\" isMarkerVisible=\"true\"><dc:Bounds x=\"1415\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1412\" y=\"203\" width=\"57\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1jr2wxz_di\" bpmnElement=\"Event_1jr2wxz\"><dc:Bounds x=\"1542\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1519\" y=\"206\" width=\"83\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1tenrb1_di\" bpmnElement=\"Event_1tenrb1\"><dc:Bounds x=\"1422\" y=\"352\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1395\" y=\"395\" width=\"90\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataStoreReference_0hezpzn_di\" bpmnElement=\"DataStoreReference_0hezpzn\"><dc:Bounds x=\"1265\" y=\"115\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1249\" y=\"92\" width=\"82\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Flow_03heoqe_di\" bpmnElement=\"Flow_03heoqe\"><di:waypoint x=\"1186\" y=\"258\" /><di:waypoint x=\"1240\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_149bcka_di\" bpmnElement=\"Flow_149bcka\"><di:waypoint x=\"1340\" y=\"258\" /><di:waypoint x=\"1415\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1lixxyy_di\" bpmnElement=\"Flow_1lixxyy\"><di:waypoint x=\"1465\" y=\"258\" /><di:waypoint x=\"1542\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1496\" y=\"240\" width=\"16\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0li6dbw_di\" bpmnElement=\"Flow_0li6dbw\"><di:waypoint x=\"1440\" y=\"283\" /><di:waypoint x=\"1440\" y=\"352\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1449\" y=\"314\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Activity_1jjkfvf_di\" bpmnElement=\"Activity_1jjkfvf\"><dc:Bounds x=\"1720\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0xwfyxd_di\" bpmnElement=\"Event_0xwfyxd\"><dc:Bounds x=\"682\" y=\"362\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"656\" y=\"405\" width=\"89\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0hc8s8p_di\" bpmnElement=\"Activity_0hc8s8p\"><dc:Bounds x=\"995\" y=\"243\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1n4aytz_di\" bpmnElement=\"Event_1n4aytz\"><dc:Bounds x=\"1912\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1886\" y=\"183\" width=\"88\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataStoreReference_04vqx4a_di\" bpmnElement=\"DataStoreReference_04vqx4a\"><dc:Bounds x=\"535\" y=\"115\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"526\" y=\"85\" width=\"68\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_1jse258_di\" bpmnElement=\"Group_1jse258\"><dc:Bounds x=\"470\" y=\"20\" width=\"480\" height=\"460\" /><bpmndi:BPMNLabel><dc:Bounds x=\"666\" y=\"27\" width=\"89\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"TextAnnotation_156mv0e_di\" bpmnElement=\"TextAnnotation_156mv0e\"><dc:Bounds x=\"790\" y=\"84\" width=\"130\" height=\"81\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"TextAnnotation_0zlensq_di\" bpmnElement=\"TextAnnotation_0zlensq\"><dc:Bounds x=\"1700\" y=\"90\" width=\"139.99567957963654\" height=\"69.68124536693847\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"DataInputAssociation_1h62npz_di\" bpmnElement=\"DataInputAssociation_1h62npz\"><di:waypoint x=\"560\" y=\"165\" /><di:waypoint x=\"560\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1phnta1_di\" bpmnElement=\"Flow_1phnta1\"><di:waypoint x=\"448\" y=\"258\" /><di:waypoint x=\"510\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0w8gd11_di\" bpmnElement=\"Flow_0w8gd11\"><di:waypoint x=\"610\" y=\"258\" /><di:waypoint x=\"675\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1mienrh_di\" bpmnElement=\"Flow_1mienrh\"><di:waypoint x=\"725\" y=\"258\" /><di:waypoint x=\"800\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"752\" y=\"244\" width=\"16\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataOutputAssociation_0sn06j3_di\" bpmnElement=\"DataOutputAssociation_0sn06j3\"><di:waypoint x=\"1290\" y=\"218\" /><di:waypoint x=\"1290\" y=\"165\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0abcn0r_di\" bpmnElement=\"Flow_0abcn0r\"><di:waypoint x=\"1630\" y=\"258\" /><di:waypoint x=\"1720\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1618o2r_di\" bpmnElement=\"Flow_1618o2r\"><di:waypoint x=\"700\" y=\"283\" /><di:waypoint x=\"700\" y=\"362\" /><bpmndi:BPMNLabel><dc:Bounds x=\"709\" y=\"320\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_19obx3f_di\" bpmnElement=\"Flow_19obx3f\"><di:waypoint x=\"900\" y=\"258\" /><di:waypoint x=\"995\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0p2xrt3_di\" bpmnElement=\"Flow_0p2xrt3\"><di:waypoint x=\"1025\" y=\"258\" /><di:waypoint x=\"1110\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0rxjn5m_di\" bpmnElement=\"Flow_0rxjn5m\"><di:waypoint x=\"1820\" y=\"258\" /><di:waypoint x=\"1912\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_04kwu8l_di\" bpmnElement=\"Association_04kwu8l\"><di:waypoint x=\"850\" y=\"218\" /><di:waypoint x=\"850\" y=\"165\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_1o8eups_di\" bpmnElement=\"Association_1o8eups\"><di:waypoint x=\"1770\" y=\"218\" /><di:waypoint x=\"1770\" y=\"160\" /></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn2:definitions>",
					"ElementParameters": "[{\"Id\":\"StartEvent_1\",\"Type\":0,\"Parameters\":{},\"SelectedTypeId\":\"ManualTrigger\",\"PromoteResultAs\":null,\"Name\":\"Manual\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1xscqf8\",\"Type\":1,\"Parameters\":{\"input\":{\"ConnectionString\":{\"mode\":\"csharp\",\"value\":\"#var.MicrosoftSqlConnectionString\"},\"Query\":{\"mode\":\"sql\",\"value\":\"SELECT {{#var.ColumnNames}} FROM {{#var.MicrosoftSqlTableName}}\"},\"Parameters\":[],\"ExecuteType\":{\"mode\":\"select\",\"value\":\"ExecuteReader\"}},\"options\":{\"ThrowErrorOnFailure\":{\"mode\":\"toggle\",\"value\":false},\"CommandTimeoutSeconds\":{\"mode\":\"integer\",\"value\":60},\"SqlTransactionIsolationLevel\":{\"mode\":\"select\",\"value\":\"ReadCommitted\"}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/52de7e2e-788d-4d77-84c9-a6c86a64e2fb/v1\",\"PromoteResultAs\":null,\"Name\":\"Fetch data from MicrosoftSQL\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_19baivf\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    var rows = #result[Fetch data from MicrosoftSQL].Data;\\n    var totalChunks = Math.Ceiling(rows.Count/(float)#var.ChunkSize);\\n    var queries = new List<string>();\\n\\n    string[] columns = #var.ColumnNames.Split(\\\", \\\");\\n\\n    for(var chunkIndex = 0; chunkIndex < totalChunks; chunkIndex++)\\n    {\\n        var sql = \\\"INSERT ALL \\\";\\n\\n        for (\\n            var rowIndex = chunkIndex * #var.ChunkSize;\\n            rowIndex < (chunkIndex + 1) * #var.ChunkSize;\\n            rowIndex++\\n        )\\n        {\\n            if (rowIndex >= rows.Count) break;\\n            var row = rows[(int)rowIndex];\\n            sql += $\\\"\\\\r\\\\nINTO {#var.OracleSchema}.{#var.OracleTableName}({#var.ColumnNames}, {#var.OracleTimestampColumn}) VALUES(\\\";\\n\\n            // Add value of each column in the row to the query\\n            for (var columnIndex = 0; columnIndex < columns.Length; columnIndex++)\\n            {\\n                sql += $\\\"'{row[columns[columnIndex]]}', \\\";\\n            }\\n\\n            // Add value for timestamp column\\n            sql += $\\\"TIMESTAMP '{DateTime.UtcNow.ToString(\\\"yyyy-MM-dd HH:mm:ss.fff\\\")}')\\\";\\n        }\\n        \\n        // Add final SELECT\\n        sql += \\\"\\\\r\\\\nSELECT * FROM dual\\\";\\n        \\n        queries.Add(sql);\\n    }\\n\\n    return queries;\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"queries\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create insert statements for Oracle\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_1d4u0qm\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Data fetched successfully?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1mienrh\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_04cpsuj\",\"Type\":13,\"Parameters\":{},\"SelectedTypeId\":\"\",\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_134k9wr\",\"Type\":10,\"Parameters\":{\"variable\":\"query\",\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.queries\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Insert data into Oracle in chunks\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1jjkfvf\",\"Type\":20,\"Parameters\":{\"keyExpression\":{\"mode\":\"text\",\"value\":\"previousSyncTime\"},\"valueExpression\":{\"mode\":\"csharp\",\"value\":\"DateTime.UtcNow.AddMinutes(-5).ToString(\\\"yyyy-MM-dd HH:mm:ss\\\")\"},\"ttlValue\":{\"mode\":\"integer\",\"value\":\"24\"},\"ttlMultiplier\":3600,\"throwIfFalse\":true,\"isGlobalScope\":true},\"SelectedTypeId\":\"AddOrUpdate\",\"PromoteResultAs\":null,\"Name\":\"Set previous sync time into cache\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_10pcjud\",\"Type\":1,\"Parameters\":{\"input\":{\"Query\":{\"mode\":\"csharp\",\"value\":\"#var.query\"},\"Parameters\":[],\"ConnectionString\":{\"mode\":\"csharp\",\"value\":\"#var.OracleConnectionString\"}},\"options\":{\"ThrowErrorOnFailure\":{\"mode\":\"toggle\",\"value\":false},\"TimeoutSeconds\":{\"mode\":\"integer\",\"value\":30},\"OracleIsolationLevel\":{\"mode\":\"select\",\"value\":\"ReadCommitted\"},\"BindParameterByName\":{\"mode\":\"toggle\",\"value\":true}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/0bfd5a7b-f89d-44f1-a7a6-d6a110906b04/v1\",\"PromoteResultAs\":null,\"Name\":\"Insert chunk into Oracle\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_1nq0lbr\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Insertion successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0xwfyxd\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An error occurred when attempting to fetch data from the MicrosoftSQL database, error message:\\r\\n\\r\\n{{#result.ErrorMessage}}\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1618o2r\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1lixxyy\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1jr2wxz\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0li6dbw\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1tenrb1\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.errors += $\\\"\\\\nChunk {#var.query_index} couldn't be inserted into Oracle. Error message:\\\\n\\\\n{#result.Message}\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0hc8s8p\",\"Type\":12,\"Parameters\":{\"variableName\":\"errors\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"\\\"\\\"\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialize error variable\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1n4aytz\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.errors != \\\"\\\" ? $\\\"Data loaded from MicrosoftSQL to Oracle. The process completed with errors:\\\\n\\\\n{#var.errors}\\\" : \\\"Data loaded successfully from MicrosoftSQL to Oracle.\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataStoreReference_04vqx4a\",\"Type\":22,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"MicrosoftSQL database\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataStoreReference_0hezpzn\",\"Type\":22,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Oracle database\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null}]",
					"ManualTriggerJson": "[]",
					"IsSubprocess": false,
					"TriggersJson": "[{\"$type\":\"ManualTrigger\",\"config\":{},\"name\":\"Manual\",\"id\":\"StartEvent_1\",\"shouldNotLogParameters\":null}]",
					"AssemblyName": null,
					"PackageId": null,
					"PackageVersion": null,
					"UsedTasksJson": "[\"/ProcessTask/52DE7E2E-788D-4D77-84C9-A6C86A64E2FB/v1\",\"/ProcessTask/0BFD5A7B-F89D-44F1-A7A6-D6A110906B04/v1\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.3.1743",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 1,
					"MinorVersion": 0,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"fd1a522a-be01-4390-93da-80e4f3c42e83": [
						{
							"Id": "52de7e2e-788d-4d77-84c9-a6c86a64e2fb",
							"PackageId": "Frends.MicrosoftSQL.ExecuteQuery",
							"PackageVersion": "1.2.0",
							"Name": "Frends.MicrosoftSQL.ExecuteQuery.MicrosoftSQL.ExecuteQuery(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "0bfd5a7b-f89d-44f1-a7a6-d6a110906b04",
							"PackageId": "Frends.Oracle.ExecuteQuery",
							"PackageVersion": "2.0.1",
							"Name": "Frends.Oracle.ExecuteQuery.Oracle.ExecuteQuery(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						}
					]
				},
				"LinkedSubProcess": {},
				"Version": "Acc41"
			}
		}
	]
}