Hi,
I'm creating FunctionResources by code.
On the system, the resource name is filled in with the value I want, for example "My Coffee Machine"
However the functionDVE name is using the Id. for example: "Kitchen.1" "Kitchen" being my Element name that has the function for which I'm making resources.
So how do I get "Kitchen.My Coffee Machine" as functionDVE name?
Here is a snippet of the code I use:
FunctionResource functionResource = new FunctionResource(protocol.DataMinerID, protocol.ElementID)
{
Name = Convert.ToString(row.Profileinstancesname_202),
PoolGUIDs = new List<Guid> { resourcePoolGuid },
FunctionGUID = functionDefinitionGuid,
LinkerTableEntries = new[] { linkerTableEntry },
MaxConcurrency = maxConcurrency,
};
This function resource will eventually get stored via the SrmManagers.ResourceManager.AddOrUpdateResources method.
Hi Mieke,
This can be achieved by setting the FunctionName in your constructor.
e.g.
FunctionResource functionResource = new FunctionResource()
{
Name = Convert.ToString(row.Profileinstancesname_202),
PoolGUIDs = new List<Guid> { resourcePoolGuid },
FunctionGUID = functionDefinitionGuid,
LinkerTableEntries = new[] { linkerTableEntry },
MaxConcurrency = maxConcurrency,
FunctionName = "My Coffee Machine"
};
Hi Mieke,
I'm unsure if the end goal is to present a nicer description of the resource in the resulting booking Service that holds all your resources but you might want to consider the "Use Node Label as Alias" feature in Booking Manager.
This feature allows your resources to show up in the Booking Service with the very same names present in your Service Definition Node Labels.
If you happen to be building a Kitchen Service Definition and have a node named "My Coffe Machine" you'll always get an Element with an Alias of "My Coffee Machine" regardless of which Resource you choose.