In my DTR script I would like to find out the protocol name of a resource that is used in a contribution resource in order to set one or the other configuration setting on the other resources.
Is there a way to access this information?
Contribution resource: Satellite Feed
Resource in Contribution resource: Demodulator
DTR on Event service definition will trigger on selection of the Satellite Feed.
Anyone who knows how to reach the Demodulator protocol name from there?
Hi Jeroen,
I've continue from the code in script SRM_DataTransferRulesTemplate, please adapt for your case.
var rxSatBooking = mainBooking.GetContributingBooking("Rx Sat");
var rxSatDecoder = rxSatBooking.GetResource("Decoding");
var rxSatDecoderFunctionResource = rxSatDecoder.Resource as Skyline.DataMiner.Net.ResourceManager.Objects.FunctionResource;
var mainElement = engine.FindElement(rxSatDecoderFunctionResource.MainDVEDmaID, rxSatDecoderFunctionResource.MainDVEElementID);
var protocolName = mainElement.ProtocolName;
Be aware that will affect the time to run you DTR scripts, so your wizard will react slower.
The contributing resource should have a property ("Main Reservation") with the id of the main reservationInstance. You should be able to retrieve that reservationInstance and get whatever you need from that?
Hi Jeroen,
I don't know the answer to your question, but perhaps it could be easier to just store the info against a reservation property in your contributing booking?
Thanks Jorge, that works great!