Hi all, we are using a piece of code in a QAction to generate some services based on a service template.
It was running well but we recently note that when the number of elements are quite high the TryCreateServiceMessage is returning an error and the service is not created:
Multiple options exist for Service will contain 26 elements
Our code is the following:
TryCreateServiceMessage myServiceMessagepre = new TryCreateServiceMessage
{
ServiceTemplateID = sServiceDMATemplateID,
HostingDataMinerID = -1,
CreateAll = false,
DataMinerID = -1,
ViewIDs = new Int32[]
{
-1,
},
EditInputDataOnUpdate = false, //NEW
IsReApply = false, //NEW
ExtraData = new TCSExtraData[]
{
new TCSExtraData { Name = "serviceName", Value = sServicename},
new TCSExtraData { IsFromOriginalService = false },
new TCSExtraData {Options = TCSExtraData.TCSExtraDataOptions.None },
new TCSExtraData { Name = "data:Service", Value = sServiceIndex},
}
};
TryCreateServiceResult response1 = (TryCreateServiceResult)protocol.SLNet.SendMessage(myServiceMessagepre)[0];
If we try to generate the service applying service template from surveyor (right click->Apply), Dataminer asked if we are sure to continue or abort the service creation due to that number of elements included.
Do you know if there is a way to force "continue" when using TryCreateServiceMessage ?
Thanks!
Hi Pedro,
This is expected behavior when the number of elements included in the service exceeds the threshold (by default set to 20).
In case you would like to change the threshold, you could proceed as follows:
- Using the DataMiner Taskbar Utility, open the SLNetClientTest tool (Opening the SLNetClientTestTool)
- Connect to the DMA using the SLNetClientTest Tool
- Once connected, go to Advanced -> Options -> SLNet Options ...
- In the drop-down list select the option ServiceTemplateElementCount. In the list below, you will see the default value set on each DMA in the cluster (in case there are more than one DMA in the cluster)
- Double click in the value and change it accordingly. Please keep the value reasonable to avoid performance issues
- Finally, click 'Apply'
Note:
Please be careful when changing settings using the SLNetClientTest tool. Below a warning from DataMiner Help:
Always be extremely careful when using this tool, as it can have far-reaching consequences on the functionality of your DataMiner System.
Hi Miguel, thank you very much! I’ve changed the value from 20 to 30 and these few services with more than 20 elements are correctly created.
Thanks again!