We have multiple automation scripts (SRM Profile Load Scripts) that are trying to set the same parameters on the same element at the same time which causes troubles.
Currently we're using this as locking mechanism:
private static ConcurrentDictionary<string, object> lockDictionary = new ConcurrentDictionary<string, object>();
var lockObject = lockDictionary.GetOrAdd(mainElementId, (key) => new object());
lock (lockObject)
{
//do your sets
}
However this only works within the same SLAutomation process => if the scripts are running from the same DMA. In case of a cluster environment, how can I make sure that profile load scripts that are running on different DMAs are waiting for each other before making sets to the element?
Hi Jochen,
You could use an InterApp call instead of parameter sets. An InterApp message allows you to group the parameter values in one message so that the link between them doens't get lost. The connector can execute the desired action using the values from the message. Here is a link with more information on InterApp: https://docs.dataminer.services/develop/devguide/ClassLibrary/ClassLibraryInterAppClasses.html
Do note that in case you make your API available as a NuGet your connector must use the exact same Class Library version as the one defined in the NuGet.