We would like to search specific contributing resources. To do this we like to use the same mechanism as to search (eligible) normal resources by mapping capabilities.
This means we need to add capabilities + set the value to the contributing resource.
How can this be done?
Hi Mieke,
I attempted to implement your solution, but I encountered a problem. The reservation takes a few seconds to be created, and as a result, the script that attempts to retrieve the reservation and set the capability is failing. I'm observing the message "Reservation not found for Reservation ID..." in the information events.
Therefore, this solution is not ideal. Additionally, it introduces complexity as it requires adding another script in the service definition.
I have implemented a better solution. After creating a reservation for my reusable resource (and before creating the reservation of my regular booking), I can retrieve the resource and update it using the following code:
// Generate the reservation.
var rxReusableReservation = srmInteractions.CreateReservation(rxReusable) as ServiceReservationInstance;// Get the contributing resource.
if (rxReusableReservation.TryGetContributingResource(out Resource contributingResource))
{
AddOrUpdateCapabilityOnResource(contributingResource, resourceCapability);
}
Hi Mieke,
I’m using SRM package version 1.2.28 and my DMA version is 10.3.5
Please add the minimum DMA version + minimum SRM version where these methods are available.