{
	"ProcessTemplates": [
		{
			"Name": "Local folder content summary with ChatGPT to Microsoft SQL table",
			"Modified": "2024-07-04T08:56:08.2697923",
			"Modifier": "sampo.sarlin@frends.com",
			"Tags": [
				"MicrosoftSQL",
				"ChatGPT"
			],
			"TemplateProcessTags": [],
			"Description": "This template will read the contents of a local folder and use ChatGPT to summarize each file. The summaries are then inserted into a Microsoft SQL database table.",
			"Version": 1,
			"UniqueIdentifier": "7b05be14-dc15-4354-b71e-bd2b12c4521e",
			"ProcessVariablesJson": "{\"InFilePath\":{\"Value\":\"\\\"/path/\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The path to the local folder containing the files to be summarized.\"},\"ChatGPTModel\":{\"Value\":\"\\\"gpt-3.5-turbo\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The ChatGPT model used by the OpenAI task.\"},\"ChatGPTAPIKey\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The API key for ChatGPT.\"},\"ChatGPTPrompt\":{\"Value\":\"\\\"Hello ChatGPT! Could you summarize this file for me?\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The ChatGPT prompt to ask start summarizing the file.\"},\"ConnectionString\":{\"Value\":\"\\\"Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The connection string to Microsoft SQL database.\"},\"TableName\":{\"Value\":\"\\\"summaries\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The table name in Microsoft SQL database, where the summarization is stored.\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "Local folder content summary with ChatGPT to Microsoft SQL table",
					"Modified": "2024-07-04T08:56:08.2697923",
					"Modifier": "sampo.sarlin@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This template will read the contents of a local folder and use ChatGPT to summarize each file. The summaries are then inserted into a Microsoft SQL database table.",
					"Version": 1,
					"UniqueIdentifier": "f0e213e7-c059-4e8d-b3a1-088274eb8bf6",
					"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_071lxff</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_18bic86\" name=\"Find files in a local folder\"><bpmn2:incoming>Flow_071lxff</bpmn2:incoming><bpmn2:outgoing>Flow_1ljhvr9</bpmn2:outgoing><bpmn2:property id=\"Property_0g5x2sq\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_0is8xgy\"><bpmn2:sourceRef>DataObjectReference_0pciz8m</bpmn2:sourceRef><bpmn2:targetRef>Property_0g5x2sq</bpmn2:targetRef></bpmn2:dataInputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_071lxff\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_18bic86\" /><bpmn2:exclusiveGateway id=\"Gateway_0ksz7k7\" name=\"Files found?\" default=\"Flow_0w1xqj0\"><bpmn2:incoming>Flow_1ljhvr9</bpmn2:incoming><bpmn2:outgoing>Flow_1dovajk</bpmn2:outgoing><bpmn2:outgoing>Flow_0w1xqj0</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_1ljhvr9\" sourceRef=\"Activity_18bic86\" targetRef=\"Gateway_0ksz7k7\" /><bpmn2:subProcess id=\"Activity_1i21mo0\" name=\"For each file in folder\"><bpmn2:incoming>Flow_0vngv61</bpmn2:incoming><bpmn2:outgoing>Flow_154zxoo</bpmn2:outgoing><bpmn2:multiInstanceLoopCharacteristics isSequential=\"true\" /><bpmn2:startEvent id=\"Event_1pp7jxo\"><bpmn2:outgoing>Flow_0u3ahjf</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_18urnzo\" name=\"Read file contents\"><bpmn2:incoming>Flow_0u3ahjf</bpmn2:incoming><bpmn2:outgoing>Flow_0s3l2ny</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0u3ahjf\" sourceRef=\"Event_1pp7jxo\" targetRef=\"Activity_18urnzo\" /><bpmn2:task id=\"Activity_07485qz\" name=\"Ask ChatGPT to summarize the file contents\"><bpmn2:incoming>Flow_0s3l2ny</bpmn2:incoming><bpmn2:outgoing>Flow_0w0sbss</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0s3l2ny\" sourceRef=\"Activity_18urnzo\" targetRef=\"Activity_07485qz\" /><bpmn2:exclusiveGateway id=\"Gateway_0ahaz5f\" name=\"File content summarized?\" default=\"Flow_1voua9a\"><bpmn2:incoming>Flow_0w0sbss</bpmn2:incoming><bpmn2:outgoing>Flow_1cuauip</bpmn2:outgoing><bpmn2:outgoing>Flow_1voua9a</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_0w0sbss\" sourceRef=\"Activity_07485qz\" targetRef=\"Gateway_0ahaz5f\" /><bpmn2:task id=\"Activity_1it64fx\" name=\"Insert summary to Microsoft SQL database table\"><bpmn2:incoming>Flow_1cuauip</bpmn2:incoming><bpmn2:outgoing>Flow_1uzxw8i</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_1cuauip\" name=\"yes\" sourceRef=\"Gateway_0ahaz5f\" targetRef=\"Activity_1it64fx\" /><bpmn2:endEvent id=\"Event_1gwszm6\" name=\"Add a message to the error variable and take the next file\"><bpmn2:incoming>Flow_1voua9a</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_1voua9a\" name=\"no\" sourceRef=\"Gateway_0ahaz5f\" targetRef=\"Event_1gwszm6\" /><bpmn2:exclusiveGateway id=\"Gateway_166f8t6\" name=\"Insertion successful?\" default=\"Flow_0rhpqs1\"><bpmn2:incoming>Flow_1uzxw8i</bpmn2:incoming><bpmn2:outgoing>Flow_02bpu47</bpmn2:outgoing><bpmn2:outgoing>Flow_0rhpqs1</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_1uzxw8i\" sourceRef=\"Activity_1it64fx\" targetRef=\"Gateway_166f8t6\" /><bpmn2:endEvent id=\"Event_1m3vpk5\" name=\"Success, take the next file\"><bpmn2:incoming>Flow_02bpu47</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_02bpu47\" name=\"yes\" sourceRef=\"Gateway_166f8t6\" targetRef=\"Event_1m3vpk5\" /><bpmn2:endEvent id=\"Event_139tc9h\" name=\"Add a message to the error variable and take the next file\"><bpmn2:incoming>Flow_0rhpqs1</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_0rhpqs1\" name=\"no\" sourceRef=\"Gateway_166f8t6\" targetRef=\"Event_139tc9h\" /></bpmn2:subProcess><bpmn2:sequenceFlow id=\"Flow_1dovajk\" name=\"yes\" sourceRef=\"Gateway_0ksz7k7\" targetRef=\"Activity_0bmb0k2\" /><bpmn2:intermediateThrowEvent id=\"Event_0wccghy\" name=\"Throw an error message if no files were found in the folder\"><bpmn2:incoming>Flow_0w1xqj0</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_0w1xqj0\" name=\"no\" sourceRef=\"Gateway_0ksz7k7\" targetRef=\"Event_0wccghy\" /><bpmn2:scriptTask id=\"Activity_0bmb0k2\" name=\"Initialize exceptions\"><bpmn2:incoming>Flow_1dovajk</bpmn2:incoming><bpmn2:outgoing>Flow_0qb6cra</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_0qb6cra\" sourceRef=\"Activity_0bmb0k2\" targetRef=\"Activity_0padjwu\" /><bpmn2:endEvent id=\"Event_14a8mqj\" name=\"Return a meaningful message with exceptions if there are any\"><bpmn2:incoming>Flow_154zxoo</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_154zxoo\" sourceRef=\"Activity_1i21mo0\" targetRef=\"Event_14a8mqj\" /><bpmn2:dataObjectReference id=\"DataObjectReference_0pciz8m\" name=\"Local fileshare\" dataObjectRef=\"DataObject_0e270k8\" /><bpmn2:dataObject id=\"DataObject_0e270k8\" /><bpmn2:scriptTask id=\"Activity_0padjwu\" name=\"Initialize uploads\"><bpmn2:incoming>Flow_0qb6cra</bpmn2:incoming><bpmn2:outgoing>Flow_0vngv61</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_0vngv61\" sourceRef=\"Activity_0padjwu\" targetRef=\"Activity_1i21mo0\" /><bpmn2:group id=\"Group_1p36850\" categoryValueRef=\"CategoryValue_0466uks\" /><bpmn2:group id=\"Group_0v3ezxa\" categoryValueRef=\"CategoryValue_0ahs5gs\" /><bpmn2:group id=\"Group_18e5cqi\" categoryValueRef=\"CategoryValue_0a38zek\" /><bpmn2:textAnnotation id=\"TextAnnotation_09vfo3z\"><bpmn2:text>Variables are assigned to help pinpoint any errors in the process and provide information.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_0hthw3d\" sourceRef=\"Activity_0bmb0k2\" targetRef=\"TextAnnotation_09vfo3z\" /></bpmn2:process><bpmn2:category id=\"Category_082h5x4\"><bpmn2:categoryValue id=\"CategoryValue_0466uks\" value=\"Find files in the local fileshare\" /></bpmn2:category><bpmn2:category id=\"Category_0hhi29i\"><bpmn2:categoryValue id=\"CategoryValue_0ahs5gs\" value=\"Summarization with ChatGPT\" /></bpmn2:category><bpmn2:category id=\"Category_1cvybsg\"><bpmn2:categoryValue id=\"CategoryValue_0a38zek\" value=\"Summary insertion to Microsoft SQL table\" /></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=\"362\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"362\" y=\"276\" width=\"37\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_18bic86_di\" bpmnElement=\"Activity_18bic86\"><dc:Bounds x=\"500\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_0ksz7k7_di\" bpmnElement=\"Gateway_0ksz7k7\" isMarkerVisible=\"true\"><dc:Bounds x=\"655\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"650\" y=\"209\" width=\"60\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0wccghy_di\" bpmnElement=\"Event_0wccghy\"><dc:Bounds x=\"662\" y=\"362\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"636\" y=\"405\" width=\"88\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0bmb0k2_di\" bpmnElement=\"Activity_0bmb0k2\"><dc:Bounds x=\"765\" y=\"243\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataObjectReference_0pciz8m_di\" bpmnElement=\"DataObjectReference_0pciz8m\"><dc:Bounds x=\"532\" y=\"115\" width=\"36\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"515\" y=\"85\" width=\"71\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0padjwu_di\" bpmnElement=\"Activity_0padjwu\"><dc:Bounds x=\"855\" y=\"243\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_14a8mqj_di\" bpmnElement=\"Event_14a8mqj\"><dc:Bounds x=\"2232\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2216\" y=\"283\" width=\"68\" height=\"66\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1i21mo0_di\" bpmnElement=\"Activity_1i21mo0\" isExpanded=\"true\"><dc:Bounds x=\"1040\" y=\"150\" width=\"1070\" height=\"320\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1pp7jxo_di\" bpmnElement=\"Event_1pp7jxo\"><dc:Bounds x=\"1080\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_18urnzo_di\" bpmnElement=\"Activity_18urnzo\"><dc:Bounds x=\"1190\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_07485qz_di\" bpmnElement=\"Activity_07485qz\"><dc:Bounds x=\"1360\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_0ahaz5f_di\" bpmnElement=\"Gateway_0ahaz5f\" isMarkerVisible=\"true\"><dc:Bounds x=\"1525\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1516\" y=\"196\" width=\"67\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1it64fx_di\" bpmnElement=\"Activity_1it64fx\"><dc:Bounds x=\"1710\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1gwszm6_di\" bpmnElement=\"Event_1gwszm6\"><dc:Bounds x=\"1532\" y=\"352\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1506\" y=\"395\" width=\"88\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_166f8t6_di\" bpmnElement=\"Gateway_166f8t6\" isMarkerVisible=\"true\"><dc:Bounds x=\"1885\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1881\" y=\"196\" width=\"58\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1m3vpk5_di\" bpmnElement=\"Event_1m3vpk5\"><dc:Bounds x=\"2012\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1987\" y=\"283\" width=\"87\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_139tc9h_di\" bpmnElement=\"Event_139tc9h\"><dc:Bounds x=\"1892\" y=\"352\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1866\" y=\"395\" width=\"88\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Flow_0u3ahjf_di\" bpmnElement=\"Flow_0u3ahjf\"><di:waypoint x=\"1116\" y=\"258\" /><di:waypoint x=\"1190\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0s3l2ny_di\" bpmnElement=\"Flow_0s3l2ny\"><di:waypoint x=\"1290\" y=\"258\" /><di:waypoint x=\"1360\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0w0sbss_di\" bpmnElement=\"Flow_0w0sbss\"><di:waypoint x=\"1460\" y=\"258\" /><di:waypoint x=\"1525\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1cuauip_di\" bpmnElement=\"Flow_1cuauip\"><di:waypoint x=\"1575\" y=\"258\" /><di:waypoint x=\"1710\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1591\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1voua9a_di\" bpmnElement=\"Flow_1voua9a\"><di:waypoint x=\"1550\" y=\"283\" /><di:waypoint x=\"1550\" y=\"352\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1559\" y=\"314\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1uzxw8i_di\" bpmnElement=\"Flow_1uzxw8i\"><di:waypoint x=\"1810\" y=\"258\" /><di:waypoint x=\"1885\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_02bpu47_di\" bpmnElement=\"Flow_02bpu47\"><di:waypoint x=\"1935\" y=\"258\" /><di:waypoint x=\"2012\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1965\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0rhpqs1_di\" bpmnElement=\"Flow_0rhpqs1\"><di:waypoint x=\"1910\" y=\"283\" /><di:waypoint x=\"1910\" y=\"352\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1919\" y=\"314\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0vngv61_di\" bpmnElement=\"Flow_0vngv61\"><di:waypoint x=\"885\" y=\"258\" /><di:waypoint x=\"1040\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Group_1p36850_di\" bpmnElement=\"Group_1p36850\"><dc:Bounds x=\"440\" y=\"30\" width=\"530\" height=\"490\" /><bpmndi:BPMNLabel><dc:Bounds x=\"668\" y=\"37\" width=\"74\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"TextAnnotation_09vfo3z_di\" bpmnElement=\"TextAnnotation_09vfo3z\"><dc:Bounds x=\"730\" y=\"105\" width=\"149.98743297587131\" height=\"69.70509383378015\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"DataInputAssociation_0is8xgy_di\" bpmnElement=\"DataInputAssociation_0is8xgy\"><di:waypoint x=\"550\" y=\"165\" /><di:waypoint x=\"550\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_071lxff_di\" bpmnElement=\"Flow_071lxff\"><di:waypoint x=\"398\" y=\"258\" /><di:waypoint x=\"500\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1ljhvr9_di\" bpmnElement=\"Flow_1ljhvr9\"><di:waypoint x=\"600\" y=\"258\" /><di:waypoint x=\"655\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1dovajk_di\" bpmnElement=\"Flow_1dovajk\"><di:waypoint x=\"705\" y=\"258\" /><di:waypoint x=\"765\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"723\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0w1xqj0_di\" bpmnElement=\"Flow_0w1xqj0\"><di:waypoint x=\"680\" y=\"283\" /><di:waypoint x=\"680\" y=\"362\" /><bpmndi:BPMNLabel><dc:Bounds x=\"689\" y=\"320\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0qb6cra_di\" bpmnElement=\"Flow_0qb6cra\"><di:waypoint x=\"795\" y=\"258\" /><di:waypoint x=\"855\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_154zxoo_di\" bpmnElement=\"Flow_154zxoo\"><di:waypoint x=\"2110\" y=\"258\" /><di:waypoint x=\"2232\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_0hthw3d_di\" bpmnElement=\"Association_0hthw3d\"><di:waypoint x=\"780\" y=\"243\" /><di:waypoint x=\"780\" y=\"175\" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Group_0v3ezxa_di\" bpmnElement=\"Group_0v3ezxa\"><dc:Bounds x=\"990\" y=\"30\" width=\"650\" height=\"490\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1278\" y=\"37\" width=\"74\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_18e5cqi_di\" bpmnElement=\"Group_18e5cqi\"><dc:Bounds x=\"1660\" y=\"30\" width=\"480\" height=\"490\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1864\" y=\"37\" width=\"71\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape></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_18bic86\",\"Type\":1,\"Parameters\":{\"input\":{\"Directory\":{\"mode\":\"csharp\",\"value\":\"#var.InFilePath\"},\"Pattern\":{\"mode\":\"text\",\"value\":\"*\"}},\"options\":{\"UseGivenUserCredentialsForRemoteConnections\":{\"mode\":\"toggle\",\"value\":false},\"UserName\":{\"mode\":\"text\",\"value\":\"domain\\\\username\"},\"Password\":{\"mode\":\"text\",\"value\":\"\"}}},\"SelectedTypeId\":\"/ProcessTask/f74a6e79-5336-4875-a109-507f9e4baa2e/v1\",\"PromoteResultAs\":null,\"Name\":\"Find files in a local folder\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_0ksz7k7\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Files.Count != 0\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Files found?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1pp7jxo\",\"Type\":13,\"Parameters\":{},\"SelectedTypeId\":\"\",\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1i21mo0\",\"Type\":10,\"Parameters\":{\"variable\":\"file\",\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Find files in a local folder].Files\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"For each file in folder\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1dovajk\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0wccghy\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"No files were found in the folder {{#var.InFilePath}}.\"},\"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_0w1xqj0\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0bmb0k2\",\"Type\":12,\"Parameters\":{\"variableName\":\"exceptions\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"\\\"\\\"\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialize exceptions\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_18urnzo\",\"Type\":1,\"Parameters\":{\"input\":{\"Path\":{\"mode\":\"text\",\"value\":\"{{#var.file.FullPath}}\"}},\"options\":{\"UseGivenUserCredentialsForRemoteConnections\":{\"mode\":\"toggle\",\"value\":false},\"UserName\":{\"mode\":\"text\",\"value\":\"domain\\\\username\"},\"Password\":{\"mode\":\"text\",\"value\":\"\"},\"FileEncoding\":{\"mode\":\"select\",\"value\":\"UTF8\"},\"EnableBom\":{\"mode\":\"toggle\",\"value\":false},\"EncodingInString\":{\"mode\":\"text\",\"value\":\"\"}}},\"SelectedTypeId\":\"/ProcessTask/7bef1e4f-5122-471b-8456-e52a2b0e9ba0/v1\",\"PromoteResultAs\":null,\"Name\":\"Read file contents\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_07485qz\",\"Type\":1,\"Parameters\":{\"input\":{\"Model\":{\"mode\":\"csharp\",\"value\":\"#var.ChatGPTModel\"},\"ApiKey\":{\"mode\":\"csharp\",\"value\":\"#var.ChatGPTAPIKey\"},\"Messages\":[{\"Content\":{\"mode\":\"csharp\",\"value\":\"#var.ChatGPTPrompt + \\\"\\\\n\\\" +\\r\\n#result[Read file contents].Content\"},\"Role\":{\"mode\":\"text\",\"value\":\"user\"}}]},\"options\":{\"MaxTokens\":{\"mode\":\"csharp\",\"value\":\"\"},\"N\":{\"mode\":\"integer\",\"value\":1},\"Seed\":{\"mode\":\"csharp\",\"value\":\"\"},\"User\":{\"mode\":\"text\",\"value\":\"\"},\"ThrowExceptionOnErrorResponse\":{\"mode\":\"toggle\",\"value\":true}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/3c32eb4a-4c94-4d4b-b258-f2e66ae7c2e4/v1\",\"PromoteResultAs\":null,\"Name\":\"Ask ChatGPT to summarize the file contents\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_0ahaz5f\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"File content summarized?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1cuauip\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1it64fx\",\"Type\":1,\"Parameters\":{\"input\":{\"ConnectionString\":{\"mode\":\"csharp\",\"value\":\"#var.ConnectionString\"},\"Query\":{\"mode\":\"sql\",\"value\":\"INSERT INTO {{#var.TableName}} (filename, created, summary) \\r\\nVALUES (@filename, GETDATE(), @summary);\"},\"Parameters\":[{\"Name\":{\"mode\":\"text\",\"value\":\"summary\"},\"Value\":{\"mode\":\"text\",\"value\":\"'{{#result[Ask ChatGPT to summarize the file contents].ChatCompletion.Choices[0].Message.Content}}'\"},\"SqlDataType\":{\"mode\":\"select\",\"value\":\"Auto\"}},{\"Name\":{\"mode\":\"text\",\"value\":\"filename\"},\"Value\":{\"mode\":\"text\",\"value\":\"'{{#var.file.FileName}}'\"},\"SqlDataType\":{\"mode\":\"select\",\"value\":\"Auto\"}}],\"ExecuteType\":{\"mode\":\"select\",\"value\":\"ExecuteReader\"}},\"options\":{\"ThrowErrorOnFailure\":{\"mode\":\"toggle\",\"value\":true},\"CommandTimeoutSeconds\":{\"mode\":\"integer\",\"value\":60},\"SqlTransactionIsolationLevel\":{\"mode\":\"select\",\"value\":\"ReadCommitted\"}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/52de7e2e-788d-4d77-84c9-a6c86a64e2fb/v1\",\"PromoteResultAs\":null,\"Name\":\"Insert summary to Microsoft SQL database table\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1voua9a\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1gwszm6\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.exceptions += $\\\"\\\\nFile {#var.file.FileName} content could not be read:\\\\n{#result[Ask ChatGPT to summarize the file contents].Error}\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_14a8mqj\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.exceptions != \\\"\\\" ? $\\\"Out of {#result[Find files in a local folder].Files.Count} file(s) in the folder, the contents of {#var.uploads} file(s) have been summarized and sent to database. Following exceptions occurred: \\\\n\\\" + #var.exceptions.ToString() : $\\\"The contents of all {#var.uploads} file(s) have been summarized and sent to database.\\\" \"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_166f8t6\",\"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\":\"Flow_02bpu47\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1m3vpk5\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.uploads += 1\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0rhpqs1\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_139tc9h\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.exceptions += $\\\"\\\\nSummary for file {#var.file.FileName} could not be inserted to database table:\\\\n{#result[Insert summary to Microsoft SQL database table].ErrorMessage}\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataObjectReference_0pciz8m\",\"Type\":21,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Local fileshare\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0padjwu\",\"Type\":12,\"Parameters\":{\"variableName\":\"uploads\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"0\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialize uploads\",\"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/F74A6E79-5336-4875-A109-507F9E4BAA2E/v1\",\"/ProcessTask/7BEF1E4F-5122-471B-8456-E52A2B0E9BA0/v1\",\"/ProcessTask/3C32EB4A-4C94-4D4B-B258-F2E66AE7C2E4/v1\",\"/ProcessTask/52DE7E2E-788D-4D77-84C9-A6C86A64E2FB/v1\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.3.1743",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 1,
					"MinorVersion": 0,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"f0e213e7-c059-4e8d-b3a1-088274eb8bf6": [
						{
							"Id": "f74a6e79-5336-4875-a109-507f9e4baa2e",
							"PackageId": "Frends.Files.Find",
							"PackageVersion": "1.0.1",
							"Name": "Frends.Files.Find.Files.Find(Input, Options)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "7bef1e4f-5122-471b-8456-e52a2b0e9ba0",
							"PackageId": "Frends.Files.Read",
							"PackageVersion": "1.0.0",
							"Name": "Frends.Files.Read.Files.Read(Input, Options)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "3c32eb4a-4c94-4d4b-b258-f2e66ae7c2e4",
							"PackageId": "Frends.OpenAI.CallChatGPT",
							"PackageVersion": "1.0.1",
							"Name": "Frends.OpenAI.CallChatGPT.OpenAI.CallChatGPT(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"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"
						}
					]
				},
				"LinkedSubProcess": {},
				"Version": "Acc41"
			}
		}
	]
}