CompoundDictionarySourceResult SetCompoundDictionarySource(RdsId id, SetCompoundDictionarySourceArg tArg)
id. Moniker of composite MDM dictionary data source.
tArg. Operation execution parameters.
The SetCompoundDictionarySource operation changes composite MDM dictionary data source settings.
To execute the operation, in the tRds field specify moniker of opened composite MDM dictionary instance, and in the tArg.pattern field specify the pattern that will be used for changing, and in the tArg.meta field specify data source settings to be determined. The moniker can be obtained on executing the CreateCompoundDictionarySource, OpenCompoundDictionarySource operation.
The operation results in the updated metadata of the data source if the tArg.metaGet field was defined.
Below is the example of changing the dictionary, on which the data source of composite MDM dictionary is based. The request contains moniker of the data source and repository dictionary description. The response contains updated data source metadata.
The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"SetCompoundDictionarySource" :
{
"id" :
{
"id" : "LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO!Sources!2"
},
"tArg" :
{
"meta" :
{
"k" : "0",
"source" :
{
"@isShortcut" : "false",
"@isLink" : "false",
"@hf" : "false",
"i" : "OBJ305387",
"n" : "Products",
"k" : "305387",
"c" : "3076",
"p" : "5610",
"h" : "false",
"hasPrv" : "false",
"ic" : "false"
}
},
"pattern" :
{
"all" : "true"
},
"metaGet" :
{
"all" : "true"
}
}
}
}
{
"SetCompoundDictionarySourceResult" :
{
"id" :
{
"id" : "LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO!Sources!2"
},
"meta" :
{
"k" : "2",
"id" : "COMPOUNDDICTIONARYSOURCE1",
"n" : "Source1",
"vis" : "1",
"source" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "4",
"@hf" : "0",
"i" : "OBJ305387",
"n" : "Products",
"k" : "305387",
"c" : "3076",
"p" : "5610",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"mappings" : ""
}
}
}
public static CompoundDictionarySourceResult SetCompoundDictionarySource(MbId mb, string compDictMoniker, string sourceMoniker, string dictId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetCompoundDictionarySource()
{
tArg = new SetCompoundDictionarySourceArg()
{
meta = new RdsCompoundDictSource()
{
source = FindObjectById(mb, dictId)
},
pattern = new RdsCompoundDictSourcePattern()
{
all = true
},
metaGet = new RdsCompoundDictSourcePattern()
{
all = true
}
},
id = new RdsId() { id = sourceMoniker }
};
// Set a dictionary that will be used as a data source for composite MDM dictionary
var tResult = somClient.SetCompoundDictionarySource(tSet);
return tResult;
}
See also: