elsa-core
elsa-core copied to clipboard
Workflow Instance Data field JSON truncated (SQL Server persistence)
Currently I have a ASPNET custom web app setup, using Elsa 2.4.2.1 packages. When running a workflow that uses the ForEach activity that loops through an array (fetched from Transient Variable), of about 2000 records, while processing, (No errors are reported) but at some point the workflow seems to stop prematurely (with a Finished state) but when looking at the "Data" field within SQL Server for that Workflow Instance... the JSON structure can be seen too be truncated, and doesnt conform to a full JSON serialized object.
The Data field is using nvarchar(max) and isnt at all reaching a data type limit in SQL Server.
Without any clear error, it is unknown why the JSON is being truncated, and this causes loading the Workflow Instances view in the designer to become very slow as more and more truncated workflow instances get persisted.
Is there any idea what could be causing this?
Are you sure the stored JSON is actually truncated and not that it only appears this way when using SQL Server Management Studio to copy & paste the Data value into e.g. notepad? This happened to me in the past 😅
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.