I am trying to query images in machine flow that I want to send as API data to my frontend application.
After receiving the query result I am simply using
[name : item.name, media_object: Base64Encode(item.media_object), lu_name : item.lu_name, media_text : item.media_text];
To transform the binary raw data as base64 image.
The flow works perfectly fine when there is only one row . But throws memory exception error when I have even 2 rows of data. Am I missing something ? Anyone had the same issue ?
It looks like you are retrieving blob data from IFS Database correct?
If you run a machine workflow in Studio to test it, and you are working with binary data, you will get that error a lot (the binary internals of Novacura are not optimized). If you convert your app to be a user workflow and run it in the windows application (not in the browser), you shouldn’t get this error. Also, if you run it as a scheduled task, you also shouldn’t get this error (unless the server actually runs out of available RAM).
Now, for a better solution to your problem…
Instead of base64encoding the data and returning that to your frontend, why don’t you pass just the blob/binary data directly? Once you remove the base64encode from your code in Novacura, you will not get the memory exception message.
Thank you for your response. Yes I am displaying the information straight from IFS. The error happens in the machine step not in the script step when I use base64encoding.
Regardless, when I try to send raw data it gives me a binary reference like so “$binary:67881fde-97fb-45be-a8e0-ed64f55ced29”.
Surprisingly flow is working now without any change (for my use case) but I think if there will be more data in future it would throw the same error.