Hi.
I have a low code app that triggers a IAS. From there the user can add entries to a dropdown. I need to store the dropdown options in a json file and make it available to everyone that runs again the IAS.
I'm currently storing it in a folder but I think that it doesn't sync immediately across the system and only is available if you log through the dma where it's stored.
private const string FilePath = @"C:\Skyline DataMiner\Webpages\Public\MediaOps\RegexPatterns.json";
Is there a better way of doing it?
Hi Daniel,
I'd recommend taking a look at this question for how to sync a file in an Automation Script: How to programmatically sync files via Automation Script (equivalent to Tools > Synchronization UI)? - DataMiner Dojo
Let me know if this help!
Bauti
Hey Daniel, assuming you are using a FileStream to read the file, you can use FileShare.Read to allow Syncs to update the FileStream and then set up a FileSystemWatcher to update what the user sees when the File is changed.
https://learn.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher
I tried this in a failover pair and it syncs the folder automatically.
The problem is if we have 2 failover pairs in the cluster. If user A connects to A and User B connects to B and they write at same time. Both will be able to do it because it's going to create a file in A and B locally. Then a sync will eventually happen and things will not work properly.
That's what I think.