CompoundDictionarySourceResult OpenCompoundDictionarySource(RdsId tRds, OpenCompoundDictionarySourceArg tArg)
mon. Moniker of opened composite MDM dictionary instance.
tArg. Operation execution parameters.
The OpenCompoundDictionarySource operation opens composite MDM dictionary data source.
To execute the operation, in the tRds field specify moniker of opened composite MDM dictionary instance, and in the tArg.k field specify data source key, and in the tArg.metaGet field specify the pattern that will be used to get data source metadata on opening. The moniker can be obtained on executing the OpenRds operation. Data source key can be obtained in the sources collection, which can be obtained on executing the OpenRds or GetRds operation.
The operation results in the moniker and metadata of composite MDM dictionary data source.
Further work with the data source is executed using the following operations: GetCompoundDictionarySource, SetCompoundDictionarySource, SaveCompoundDictionarySource. To close the data source, use the CloseCopmpoundDictionarySource operation.
Below is the example of opening composite MDM dictionary data source. The response contains moniker of opened composite MDM dictionary instance, data source key, and the pattern for getting metadata. The response contains moniker of opened data source and obtained metadata.
{
"OpenCompoundDictionarySource" :
{
"tRds" :
{
"id" : "LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO"
},
"tArg" :
{
"meta" :
{
"k" : "1"
},
"metaGet" :
{
"all" : "true"
}
}
}
}
{
"OpenCompoundDictionarySourceResult" :
{
"id" :
{
"id" : "LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO!Sources!1"
},
"meta" :
{
"k" : "1",
"id" : "COMPOUNDDICTIONARYSOURCE",
"n" : "Source",
"vis" : "1",
"source" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "5",
"@hf" : "0",
"i" : "OBJ305385",
"n" : "Enterprises",
"k" : "305385",
"c" : "3076",
"p" : "5610",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"mappings" : ""
}
}
}
public static CompoundDictionarySourceResult OpenCompoundDictionarySource(string compDictMoniker, uint sourceKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tClose = new OpenCompoundDictionarySource()
{
tArg = new OpenCompoundDictionarySourceArg()
{
meta = new RdsCompoundDictSource()
{
k = sourceKey
},
metaGet = new RdsCompoundDictSourcePattern()
{
all = true
}
},
tRds = new RdsId() { id = compDictMoniker }
};
// Open composite MDM dictionary data source
var tResult = somClient.OpenCompoundDictionarySource(tClose);
return tResult;
}
See also: