﻿{
	"ProcessTemplates": [
		{
			"Name": "CSV file from SFTP server to Oracle DB INSERT",
			"Modified": "2024-05-10T11:19:21.2357358",
			"Modifier": "jefim.borissov@frends.com",
			"Tags": [
				"SFTP",
				"CSV",
				"Oracle"
			],
			"TemplateProcessTags": [],
			"Description": "This process will retrieve a **CSV file** from the specified **SFTP** server.\nIt will take the contents of the file and use it to  create an **Oracle Database** INSERT statement. It will then execute the statement on the specified **Oracle Database**.",
			"Version": 1,
			"UniqueIdentifier": "5adf2bc3-8d2f-441c-8867-122fd05c5db5",
			"ProcessVariablesJson": "{\"FilePath\":{\"Value\":\"\\\"/\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":null},\"SftpServerAddress\":{\"Value\":\"\\\"127.0.0.1\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"SFTP server address.\"},\"SftpServerUser\":{\"Value\":\"\\\"user\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"SFTP server user.\"},\"SftpServerPassword\":{\"Value\":\"\\\"password\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"SFTP server password.\"},\"OracleConnectionString\":{\"Value\":\"\\\"Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"Connection string to access the database.\"},\"TableName\":{\"Value\":\"\\\"table\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Table name in the database.\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "CSV file from SFTP server to Oracle DB INSERT",
					"Modified": "2024-05-10T11:19:21.2357358",
					"Modifier": "jefim.borissov@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This process will retrieve a **CSV file** from the specified **SFTP** server.\nIt will take the contents of the file and use it to  create an **Oracle Database** INSERT statement. It will then execute the statement on the specified **Oracle Database**.",
					"Version": 1,
					"UniqueIdentifier": "29f647cc-8ad5-42cf-aba1-5d6679cc6042",
					"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_00uh5zi</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_1t3j2vx\" name=\"Read CSV input file from SFTP server\"><bpmn2:incoming>Flow_00uh5zi</bpmn2:incoming><bpmn2:outgoing>Flow_0hrntp0</bpmn2:outgoing><bpmn2:property id=\"Property_1qc75f2\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_17r5rlk\"><bpmn2:sourceRef>DataObjectReference_0ksp4rn</bpmn2:sourceRef><bpmn2:targetRef>Property_1qc75f2</bpmn2:targetRef></bpmn2:dataInputAssociation><bpmn2:standardLoopCharacteristics /></bpmn2:task><bpmn2:exclusiveGateway id=\"Gateway_14nb58k\" name=\"File read successful?\" default=\"Flow_1rpttpj\"><bpmn2:incoming>Flow_0hrntp0</bpmn2:incoming><bpmn2:outgoing>Flow_0fqwnfb</bpmn2:outgoing><bpmn2:outgoing>Flow_1rpttpj</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:dataObjectReference id=\"DataObjectReference_0ksp4rn\" name=\"JSON file\" dataObjectRef=\"DataObject_0ovso3e\" /><bpmn2:dataObject id=\"DataObject_0ovso3e\" /><bpmn2:sequenceFlow id=\"Flow_0hrntp0\" sourceRef=\"Activity_1t3j2vx\" targetRef=\"Gateway_14nb58k\" /><bpmn2:sequenceFlow id=\"Flow_00uh5zi\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_1t3j2vx\" /><bpmn2:sequenceFlow id=\"Flow_0fqwnfb\" name=\"yes\" sourceRef=\"Gateway_14nb58k\" targetRef=\"Activity_1gzshbf\" /><bpmn2:subProcess id=\"Activity_0fizi4r\" name=\"For each row in file\"><bpmn2:incoming>Flow_1mjb2gp</bpmn2:incoming><bpmn2:incoming>Flow_03dy838</bpmn2:incoming><bpmn2:outgoing>Flow_10w7jgx</bpmn2:outgoing><bpmn2:multiInstanceLoopCharacteristics isSequential=\"true\" /><bpmn2:startEvent id=\"Event_1izsk9n\"><bpmn2:outgoing>Flow_0e2milx</bpmn2:outgoing><bpmn2:outgoing>Flow_0m2rl4n</bpmn2:outgoing></bpmn2:startEvent><bpmn2:scriptTask id=\"Activity_1mnaiqp\" name=\"Create INSERT statement\"><bpmn2:incoming>Flow_0e2milx</bpmn2:incoming><bpmn2:outgoing>Flow_0n9bsbd</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:task id=\"Activity_04rh3p3\" name=\"Execute the INSERT statement\"><bpmn2:incoming>Flow_0n9bsbd</bpmn2:incoming><bpmn2:incoming>Flow_01706im</bpmn2:incoming><bpmn2:outgoing>Flow_171wek0</bpmn2:outgoing><bpmn2:standardLoopCharacteristics /></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0e2milx\" sourceRef=\"Event_1izsk9n\" targetRef=\"Activity_1mnaiqp\" /><bpmn2:scriptTask id=\"Activity_1vh9nk4\" name=\"Create parameters\"><bpmn2:incoming>Flow_0m2rl4n</bpmn2:incoming><bpmn2:outgoing>Flow_01706im</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:endEvent id=\"Event_13pr8r2\"><bpmn2:incoming>Flow_0c2yo7g</bpmn2:incoming><bpmn2:incoming>Flow_1wee7ty</bpmn2:incoming></bpmn2:endEvent><bpmn2:exclusiveGateway id=\"Gateway_0ah3ngq\" name=\"Database update successful?\" default=\"Flow_0yosttx\"><bpmn2:incoming>Flow_171wek0</bpmn2:incoming><bpmn2:outgoing>Flow_1otwlsz</bpmn2:outgoing><bpmn2:outgoing>Flow_0yosttx</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:scriptTask id=\"Activity_1al9zyu\" name=\"Increment success count\"><bpmn2:incoming>Flow_1otwlsz</bpmn2:incoming><bpmn2:outgoing>Flow_0c2yo7g</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:scriptTask id=\"Activity_1linepl\" name=\"Increment fail count\"><bpmn2:incoming>Flow_0yosttx</bpmn2:incoming><bpmn2:outgoing>Flow_1wee7ty</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_0c2yo7g\" sourceRef=\"Activity_1al9zyu\" targetRef=\"Event_13pr8r2\" /><bpmn2:sequenceFlow id=\"Flow_1otwlsz\" name=\"yes\" sourceRef=\"Gateway_0ah3ngq\" targetRef=\"Activity_1al9zyu\" /><bpmn2:sequenceFlow id=\"Flow_0yosttx\" name=\"no\" sourceRef=\"Gateway_0ah3ngq\" targetRef=\"Activity_1linepl\" /><bpmn2:sequenceFlow id=\"Flow_171wek0\" sourceRef=\"Activity_04rh3p3\" targetRef=\"Gateway_0ah3ngq\" /><bpmn2:sequenceFlow id=\"Flow_0m2rl4n\" sourceRef=\"Event_1izsk9n\" targetRef=\"Activity_1vh9nk4\" /><bpmn2:sequenceFlow id=\"Flow_0n9bsbd\" sourceRef=\"Activity_1mnaiqp\" targetRef=\"Activity_04rh3p3\" /><bpmn2:sequenceFlow id=\"Flow_01706im\" sourceRef=\"Activity_1vh9nk4\" targetRef=\"Activity_04rh3p3\" /><bpmn2:sequenceFlow id=\"Flow_1wee7ty\" sourceRef=\"Activity_1linepl\" targetRef=\"Event_13pr8r2\" /><bpmn2:association id=\"Association_1k82moa\" sourceRef=\"Activity_1mnaiqp\" targetRef=\"TextAnnotation_0lqwta1\" /><bpmn2:textAnnotation id=\"TextAnnotation_0lqwta1\"><bpmn2:text>Create the INSERT statement based on the column names from the input file.</bpmn2:text></bpmn2:textAnnotation><bpmn2:textAnnotation id=\"TextAnnotation_11q3ahw\"><bpmn2:text>Create the parameters for the INSERT statement based on values from the input file.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_1kowv7f\" sourceRef=\"Activity_1vh9nk4\" targetRef=\"TextAnnotation_11q3ahw\" /></bpmn2:subProcess><bpmn2:scriptTask id=\"Activity_11zxk0m\" name=\"Initialise success count\"><bpmn2:incoming>Flow_1alqexs</bpmn2:incoming><bpmn2:outgoing>Flow_1mjb2gp</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:scriptTask id=\"Activity_0kvjalz\" name=\"Initialise failure count\"><bpmn2:incoming>Flow_0zs6fze</bpmn2:incoming><bpmn2:outgoing>Flow_03dy838</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:endEvent id=\"Event_1iedv3k\"><bpmn2:incoming>Flow_1fndhvi</bpmn2:incoming></bpmn2:endEvent><bpmn2:scriptTask id=\"Activity_0fx7zdo\" name=\"Create output message\"><bpmn2:incoming>Flow_10w7jgx</bpmn2:incoming><bpmn2:outgoing>Flow_1fndhvi</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_1fndhvi\" sourceRef=\"Activity_0fx7zdo\" targetRef=\"Event_1iedv3k\" /><bpmn2:sequenceFlow id=\"Flow_10w7jgx\" sourceRef=\"Activity_0fizi4r\" targetRef=\"Activity_0fx7zdo\" /><bpmn2:task id=\"Activity_1gzshbf\" name=\"Convert the CSV data to JSON\"><bpmn2:incoming>Flow_0fqwnfb</bpmn2:incoming><bpmn2:outgoing>Flow_1alqexs</bpmn2:outgoing><bpmn2:outgoing>Flow_0zs6fze</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_1alqexs\" sourceRef=\"Activity_1gzshbf\" targetRef=\"Activity_11zxk0m\" /><bpmn2:intermediateThrowEvent id=\"Event_0pvapan\" name=\"Throw an error if the file is empty\"><bpmn2:incoming>Flow_1rpttpj</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_1rpttpj\" name=\"no\" sourceRef=\"Gateway_14nb58k\" targetRef=\"Event_0pvapan\" /><bpmn2:sequenceFlow id=\"Flow_0zs6fze\" sourceRef=\"Activity_1gzshbf\" targetRef=\"Activity_0kvjalz\" /><bpmn2:sequenceFlow id=\"Flow_1mjb2gp\" sourceRef=\"Activity_11zxk0m\" targetRef=\"Activity_0fizi4r\" /><bpmn2:sequenceFlow id=\"Flow_03dy838\" sourceRef=\"Activity_0kvjalz\" targetRef=\"Activity_0fizi4r\" /><bpmn2:textAnnotation id=\"TextAnnotation_1pe0x1m\"><bpmn2:text>Use Task to convert CSV to JSON. \nEach row in the CSV will represent one row to be inserted in the database.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_0vcgr6z\" sourceRef=\"Activity_1gzshbf\" targetRef=\"TextAnnotation_1pe0x1m\" /><bpmn2:group id=\"Group_02jjq0w\" categoryValueRef=\"CategoryValue_01n27h4\" /><bpmn2:group id=\"Group_16avw1g\" categoryValueRef=\"CategoryValue_0lqerw8\" /></bpmn2:process><bpmn2:category id=\"Category_01u0cs7\"><bpmn2:categoryValue id=\"CategoryValue_01n27h4\" value=\"Download CSV from SFTP\" /></bpmn2:category><bpmn2:category id=\"Category_19pww73\"><bpmn2:categoryValue id=\"CategoryValue_0lqerw8\" value=\"Insert data into database\" /></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=\"160\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"412\" y=\"196\" width=\"37\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1t3j2vx_di\" bpmnElement=\"Activity_1t3j2vx\"><dc:Bounds x=\"500\" y=\"138\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_14nb58k_di\" bpmnElement=\"Gateway_14nb58k\" isMarkerVisible=\"true\"><dc:Bounds x=\"655\" y=\"153\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"651\" y=\"116\" width=\"58\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataObjectReference_0ksp4rn_di\" bpmnElement=\"DataObjectReference_0ksp4rn\"><dc:Bounds x=\"532\" y=\"305\" width=\"36\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"528\" y=\"362\" width=\"47\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0fizi4r_di\" bpmnElement=\"Activity_0fizi4r\" isExpanded=\"true\"><dc:Bounds x=\"1120\" y=\"-18\" width=\"760\" height=\"392\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_05dcit6\" bpmnElement=\"TextAnnotation_11q3ahw\"><dc:Bounds x=\"1440\" y=\"280\" width=\"175\" height=\"50\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_190lrq6\" bpmnElement=\"TextAnnotation_0lqwta1\"><dc:Bounds x=\"1435\" y=\"30\" width=\"185\" height=\"57\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1izsk9n_di\" bpmnElement=\"Event_1izsk9n\"><dc:Bounds x=\"1160\" y=\"164\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_06rsf7n\" bpmnElement=\"Activity_1mnaiqp\"><dc:Bounds x=\"1260\" y=\"63\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_04rh3p3_di\" bpmnElement=\"Activity_04rh3p3\"><dc:Bounds x=\"1440\" y=\"142\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1vh9nk4_di\" bpmnElement=\"Activity_1vh9nk4\"><dc:Bounds x=\"1260\" y=\"223\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_0rri5q2\" bpmnElement=\"Event_13pr8r2\"><dc:Bounds x=\"1802\" y=\"164\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_1xkw4ba\" bpmnElement=\"Gateway_0ah3ngq\" isMarkerVisible=\"true\"><dc:Bounds x=\"1635\" y=\"157\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1696\" y=\"169\" width=\"84\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_0q7jjuv\" bpmnElement=\"Activity_1al9zyu\"><dc:Bounds x=\"1725\" y=\"66\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_03ijfyx\" bpmnElement=\"Activity_1linepl\"><dc:Bounds x=\"1725\" y=\"248\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Association_1kowv7f_di\" bpmnElement=\"Association_1kowv7f\"><di:waypoint x=\"1360\" y=\"289\" /><di:waypoint x=\"1440\" y=\"296\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"BPMNEdge_01be9ag\" bpmnElement=\"Association_1k82moa\"><di:waypoint x=\"1360\" y=\"78\" /><di:waypoint x=\"1435\" y=\"69\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0e2milx_di\" bpmnElement=\"Flow_0e2milx\"><di:waypoint x=\"1196\" y=\"182\" /><di:waypoint x=\"1228\" y=\"182\" /><di:waypoint x=\"1228\" y=\"103\" /><di:waypoint x=\"1260\" y=\"103\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"BPMNEdge_0b3kabu\" bpmnElement=\"Flow_0c2yo7g\"><di:waypoint x=\"1755\" y=\"81\" /><di:waypoint x=\"1820\" y=\"81\" /><di:waypoint x=\"1820\" y=\"164\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"BPMNEdge_09c03k2\" bpmnElement=\"Flow_1otwlsz\"><di:waypoint x=\"1660\" y=\"157\" /><di:waypoint x=\"1660\" y=\"81\" /><di:waypoint x=\"1725\" y=\"81\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1665\" y=\"123\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"BPMNEdge_1dkndya\" bpmnElement=\"Flow_0yosttx\"><di:waypoint x=\"1660\" y=\"207\" /><di:waypoint x=\"1660\" y=\"263\" /><di:waypoint x=\"1725\" y=\"263\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1667\" y=\"233\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_171wek0_di\" bpmnElement=\"Flow_171wek0\"><di:waypoint x=\"1540\" y=\"182\" /><di:waypoint x=\"1635\" y=\"182\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0m2rl4n_di\" bpmnElement=\"Flow_0m2rl4n\"><di:waypoint x=\"1196\" y=\"182\" /><di:waypoint x=\"1228\" y=\"182\" /><di:waypoint x=\"1228\" y=\"263\" /><di:waypoint x=\"1260\" y=\"263\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0n9bsbd_di\" bpmnElement=\"Flow_0n9bsbd\"><di:waypoint x=\"1360\" y=\"103\" /><di:waypoint x=\"1400\" y=\"103\" /><di:waypoint x=\"1400\" y=\"182\" /><di:waypoint x=\"1440\" y=\"182\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_01706im_di\" bpmnElement=\"Flow_01706im\"><di:waypoint x=\"1360\" y=\"263\" /><di:waypoint x=\"1400\" y=\"263\" /><di:waypoint x=\"1400\" y=\"182\" /><di:waypoint x=\"1440\" y=\"182\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1wee7ty_di\" bpmnElement=\"Flow_1wee7ty\"><di:waypoint x=\"1755\" y=\"263\" /><di:waypoint x=\"1820\" y=\"263\" /><di:waypoint x=\"1820\" y=\"200\" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Activity_11zxk0m_di\" bpmnElement=\"Activity_11zxk0m\"><dc:Bounds x=\"965\" y=\"125\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_09stvfy\" bpmnElement=\"Activity_0kvjalz\"><dc:Bounds x=\"965\" y=\"205\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1iedv3k_di\" bpmnElement=\"Event_1iedv3k\"><dc:Bounds x=\"2082\" y=\"160\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0fx7zdo_di\" bpmnElement=\"Activity_0fx7zdo\"><dc:Bounds x=\"1920\" y=\"138\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1gzshbf_di\" bpmnElement=\"Activity_1gzshbf\"><dc:Bounds x=\"768\" y=\"138\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0pvapan_di\" bpmnElement=\"Event_0pvapan\"><dc:Bounds x=\"662\" y=\"312\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"640\" y=\"355\" width=\"81\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"TextAnnotation_1pe0x1m_di\" bpmnElement=\"TextAnnotation_1pe0x1m\"><dc:Bounds x=\"680\" y=\"30\" width=\"200\" height=\"70\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_02jjq0w_di\" bpmnElement=\"Group_02jjq0w\"><dc:Bounds x=\"480\" y=\"-70\" width=\"410\" height=\"480\" /><bpmndi:BPMNLabel><dc:Bounds x=\"647\" y=\"-63\" width=\"76\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_16avw1g_di\" bpmnElement=\"Group_16avw1g\"><dc:Bounds x=\"910\" y=\"-70\" width=\"1140\" height=\"480\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1444\" y=\"-63\" width=\"73\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"DataInputAssociation_17r5rlk_di\" bpmnElement=\"DataInputAssociation_17r5rlk\"><di:waypoint x=\"551\" y=\"305\" /><di:waypoint x=\"550\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0hrntp0_di\" bpmnElement=\"Flow_0hrntp0\"><di:waypoint x=\"600\" y=\"178\" /><di:waypoint x=\"655\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_00uh5zi_di\" bpmnElement=\"Flow_00uh5zi\"><di:waypoint x=\"448\" y=\"178\" /><di:waypoint x=\"500\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0fqwnfb_di\" bpmnElement=\"Flow_0fqwnfb\"><di:waypoint x=\"705\" y=\"178\" /><di:waypoint x=\"768\" y=\"178\" /><bpmndi:BPMNLabel><dc:Bounds x=\"727\" y=\"163\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1fndhvi_di\" bpmnElement=\"Flow_1fndhvi\"><di:waypoint x=\"2020\" y=\"178\" /><di:waypoint x=\"2082\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_10w7jgx_di\" bpmnElement=\"Flow_10w7jgx\"><di:waypoint x=\"1880\" y=\"178\" /><di:waypoint x=\"1920\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1alqexs_di\" bpmnElement=\"Flow_1alqexs\"><di:waypoint x=\"868\" y=\"178\" /><di:waypoint x=\"922\" y=\"178\" /><di:waypoint x=\"922\" y=\"140\" /><di:waypoint x=\"965\" y=\"140\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1rpttpj_di\" bpmnElement=\"Flow_1rpttpj\"><di:waypoint x=\"680\" y=\"203\" /><di:waypoint x=\"680\" y=\"312\" /><bpmndi:BPMNLabel><dc:Bounds x=\"689\" y=\"255\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0zs6fze_di\" bpmnElement=\"Flow_0zs6fze\"><di:waypoint x=\"868\" y=\"178\" /><di:waypoint x=\"922\" y=\"178\" /><di:waypoint x=\"922\" y=\"220\" /><di:waypoint x=\"965\" y=\"220\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1mjb2gp_di\" bpmnElement=\"Flow_1mjb2gp\"><di:waypoint x=\"995\" y=\"140\" /><di:waypoint x=\"1060\" y=\"140\" /><di:waypoint x=\"1060\" y=\"178\" /><di:waypoint x=\"1120\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_03dy838_di\" bpmnElement=\"Flow_03dy838\"><di:waypoint x=\"995\" y=\"220\" /><di:waypoint x=\"1060\" y=\"220\" /><di:waypoint x=\"1060\" y=\"178\" /><di:waypoint x=\"1120\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_0vcgr6z_di\" bpmnElement=\"Association_0vcgr6z\"><di:waypoint x=\"818\" y=\"138\" /><di:waypoint x=\"818\" y=\"100\" /></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_1t3j2vx\",\"Type\":1,\"Parameters\":{\"input\":{\"Path\":{\"mode\":\"text\",\"value\":\"{{#var.FilePath}}\"},\"FileEncoding\":{\"mode\":\"select\",\"value\":\"ANSI\"},\"EnableBom\":{\"mode\":\"toggle\",\"value\":false},\"EncodingInString\":{\"mode\":\"text\",\"value\":\"\"}},\"connection\":{\"ConnectionTimeout\":{\"mode\":\"integer\",\"value\":60},\"Address\":{\"mode\":\"csharp\",\"value\":\"#var.SftpServerAddress\"},\"Port\":{\"mode\":\"integer\",\"value\":22},\"Authentication\":{\"mode\":\"select\",\"value\":\"UsernamePassword\"},\"Username\":{\"mode\":\"csharp\",\"value\":\"#var.SftpServerUser\"},\"Password\":{\"mode\":\"csharp\",\"value\":\"#var.SftpServerPassword\"},\"PrivateKeyFile\":{\"mode\":\"text\",\"value\":\"\"},\"PrivateKeyString\":{\"mode\":\"text\",\"value\":\"\"},\"PrivateKeyPassphrase\":{\"mode\":\"text\",\"value\":\"\"},\"ServerFingerPrint\":{\"mode\":\"text\",\"value\":\"\"},\"HostKeyAlgorithm\":{\"mode\":\"select\",\"value\":\"Any\"},\"UseKeyboardInteractiveAuthentication\":{\"mode\":\"toggle\",\"value\":false},\"PromptAndResponse\":[],\"BufferSize\":{\"mode\":\"integer\",\"value\":32}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/7fe311ed-3e37-4669-8c6b-9e5792e996d0/v1\",\"PromoteResultAs\":null,\"Name\":\"Read CSV input file from SFTP server\",\"Description\":\"\",\"IsDefault\":null,\"ShouldRetry\":true,\"MaxRetryCount\":3,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_14nb58k\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"!String.IsNullOrEmpty(#result[Read CSV input file from SFTP server].Content)\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"File read successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataObjectReference_0ksp4rn\",\"Type\":21,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"JSON file\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1mnaiqp\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    string oraCols = \\\"\\\";\\n    string oraVals = \\\"\\\";\\n    \\n    foreach(JProperty a in #var.row)\\n    {\\n        oraCols += $\\\"{a.Name}, \\\";\\n        oraVals += $\\\":{a.Name}, \\\";\\n    }\\n\\n    // Remove trailing commas\\n    oraCols = oraCols.Remove(oraCols.Length-2);\\n    oraVals = oraVals.Remove(oraVals.Length-2);\\n\\n    return $\\\"INSERT INTO  {#var.TableName} ({oraCols}) VALUES ({oraVals}) \\\";\\n\\n\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"insertStatement\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create INSERT statement\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0fqwnfb\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_04rh3p3\",\"Type\":1,\"Parameters\":{\"input\":{\"Query\":{\"mode\":\"csharp\",\"value\":\"#var.insertStatement\"},\"ConnectionString\":{\"mode\":\"csharp\",\"value\":\"#var.OracleConnectionString\"},\"Parameters\":{\"mode\":\"csharp\",\"value\":\"#var.insertParameters\"}},\"options\":{\"ThrowErrorOnFailure\":{\"mode\":\"toggle\",\"value\":true},\"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\":\"Execute the INSERT statement\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":true,\"MaxRetryCount\":3,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1izsk9n\",\"Type\":13,\"Parameters\":{},\"SelectedTypeId\":\"\",\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0fizi4r\",\"Type\":10,\"Parameters\":{\"variable\":\"row\",\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Convert the CSV data to JSON].Json\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"For each row in file\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1vh9nk4\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    var parameters = new List<Frends.Oracle.ExecuteQuery.Definitions.QueryParameter>();\\n    foreach(JProperty property in #var.row)\\n    {\\n        var parameter = new Frends.Oracle.ExecuteQuery.Definitions.QueryParameter\\n        {\\n            Name = property.Name,\\n            Value = property.Value.ToString()\\n        };\\n\\n        parameters.Add(parameter);\\n    }\\n\\n    return parameters.ToArray();\\n\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"insertParameters\",\"returnType\":\"\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create parameters\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_11zxk0m\",\"Type\":12,\"Parameters\":{\"variableName\":\"successCnt\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"0\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialise success count\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0kvjalz\",\"Type\":12,\"Parameters\":{\"variableName\":\"failCnt\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"0\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialise failure count\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_13pr8r2\",\"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\":\"Gateway_0ah3ngq\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Execute the INSERT statement].Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Database update successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1al9zyu\",\"Type\":12,\"Parameters\":{\"variableName\":\"\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"#var.successCnt++\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":false}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Increment success count\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1linepl\",\"Type\":12,\"Parameters\":{\"variableName\":\"\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"#var.failCnt++\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":false}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Increment fail count\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1otwlsz\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0yosttx\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1iedv3k\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.outMsg\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0fx7zdo\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    var msg = \\\"\\\";\\n    if(#var.successCnt > 0)\\n    {\\n        msg += $\\\"{#var.successCnt} data rows were successfully inserted into table {#var.TableName}.\\\";\\n    }\\n\\n    if(#var.failCnt > 0)\\n    {\\n        msg += $\\\"{Environment.NewLine}{#var.failCnt} data rows were not inserted into table {#var.TableName}.\\\";\\n    }\\n    \\n    return msg;\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"outMsg\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create output message\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1gzshbf\",\"Type\":1,\"Parameters\":{\"input\":{\"Csv\":{\"mode\":\"csharp\",\"value\":\"#result[Read CSV input file from SFTP server].Content\"},\"Delimiter\":{\"mode\":\"text\",\"value\":\";\"},\"ColumnSpecifications\":[]},\"options\":{\"ContainsHeaderRow\":{\"mode\":\"toggle\",\"value\":true},\"TrimOutput\":{\"mode\":\"toggle\",\"value\":true},\"SkipRowsFromTop\":{\"mode\":\"integer\",\"value\":0},\"SkipEmptyRows\":{\"mode\":\"toggle\",\"value\":true},\"ReplaceHeaderWhitespaceWith\":{\"mode\":\"text\",\"value\":\" \"},\"CultureInfo\":{\"mode\":\"text\",\"value\":\"\"},\"TreatMissingFieldsAsNulls\":{\"mode\":\"toggle\",\"value\":true}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/51dc8716-78a6-40a1-a803-6be8e355cb79/v1\",\"PromoteResultAs\":null,\"Name\":\"Convert the CSV data to JSON\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0pvapan\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An error occured reading the input file {{#var.FilePath}} from SFTP server {{#var.SftpServerAddress}} - the input CSV file is empty.\"},\"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_1rpttpj\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"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/7FE311ED-3E37-4669-8C6B-9E5792E996D0/v1\",\"/ProcessTask/51DC8716-78A6-40A1-A803-6BE8E355CB79/v1\",\"/ProcessTask/0BFD5A7B-F89D-44F1-A7A6-D6A110906B04/v1\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.2.1685",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 1,
					"MinorVersion": 0,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"29f647cc-8ad5-42cf-aba1-5d6679cc6042": [
						{
							"Id": "7fe311ed-3e37-4669-8c6b-9e5792e996d0",
							"PackageId": "Frends.SFTP.ReadFile",
							"PackageVersion": "2.1.0",
							"Name": "Frends.SFTP.ReadFile.SFTP.ReadFile(Input, Connection, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "51dc8716-78a6-40a1-a803-6be8e355cb79",
							"PackageId": "Frends.CSV.ConvertToJSON",
							"PackageVersion": "1.0.0",
							"Name": "Frends.CSV.ConvertToJSON.CSV.ConvertToJSON(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"
			}
		}
	]
}