SetCompoundDictionarySource

Syntax

CompoundDictionarySourceResult SetCompoundDictionarySource(RdsId id, SetCompoundDictionarySourceArg tArg)

Parameters

id. Moniker of composite MDM dictionary data source.

tArg. Operation execution parameters.

Description

The SetCompoundDictionarySource operation changes composite MDM dictionary data source settings.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetCompoundDictionarySource xmlns="http://www.fsight.ru/PP.SOM.Som">
<id xmlns="">
  <id>LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO!Sources!2</id>
  </id>
<tArg xmlns="">
<meta>
  <k>0</k>
<source isShortcut="false" isLink="false" hf="false">
  <i>OBJ305387</i>
  <n>Products</n>
  <k>305387</k>
  <c>3076</c>
  <p>5610</p>
  <h>false</h>
  <hasPrv>false</hasPrv>
  <ic>false</ic>
  </source>
  </meta>
<pattern>
  <all>true</all>
  </pattern>
<metaGet>
  <all>true</all>
  </metaGet>
  </tArg>
  </SetCompoundDictionarySource>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetCompoundDictionarySourceResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO!Sources!2</id>
  </id>
<meta xmlns="">
  <k>2</k>
  <id>COMPOUNDDICTIONARYSOURCE1</id>
  <n>Source1</n>
  <vis>1</vis>
<source ds="" isShortcut="0" isLink="0" ver="4" hf="0">
  <i>OBJ305387</i>
  <n>Products</n>
  <k>305387</k>
  <c>3076</c>
  <p>5610</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </source>
  <mappings />
  </meta>
  </SetCompoundDictionarySourceResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"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"
}
}
}
}

JSON response:

{
"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:

Working with MDM Dictionaries