SetMbUpdateRdsElements

Syntax

SetMbUpdateRdsElementsResult SetMbUpdateRdsElements(MbUpdateId tMbUpdate, SetMbUpdateRdsElementsArg tArg)

Parameters

tMbUpdate. Moniker for working with repository update.

tArg. Operation execution parameters.

Description

The SetMbUpdateRdsElements operation is used to work with MDM dictionary elements in update without the dictionary itself.

Comments

The operation adds/deletes elements in update without having to add MDM dictionary to update. It is used during the work with MDM dictionaries and composite MDM dictionaries. To execute the operation, in the tMbUpdate field specify update moniker, and in the tArg field specify parameters for working with MDM dictionary elements. The moniker can be obtained on executing the OpenMbUpdate operation.

The operation results in the number of elements, for which the action was executed in update.

Example

Below is the example of adding three MDM dictionary elements to update. The request contains moniker for working with update, moniker of opened MDM dictionary instance, and element keys. The response contains the number of elements added to update.

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">
<SetMbUpdateRdsElements xmlns="http://www.fsight.ru/PP.SOM.Som">
<tMbUpdate xmlns="">
  <id>KFOHMMHOOKDGGOAEBBCEBJODBGLAKMMEJINOJHEBHNNLKOBA!M!S!MbUpdHEDHKNHOOKDGGOAEOENMGFPFOPNBOBOEDLJHBBFFCGEPLEBD</id>
  </tMbUpdate>
<tArg xmlns="">
<rdsInfo>
<rds>
  <id>KFOHMMHOOKDGGOAEBBCEBJODBGLAKMMEJINOJHEBHNNLKOBA!M!S!NGACPINHOOKDGGOAEJMHOHAHAAKNNFOAEBLDIIDLOKCDKNJFE</id>
  </rds>
  </rdsInfo>
  <op>Add</op>
  <includeChildren>true</includeChildren>
<elements>
<its>
<it>
  <key>1</key>
  </it>
<it>
  <key>2</key>
  </it>
<it>
  <key>3</key>
  </it>
  </its>
  </elements>
  </tArg>
  </SetMbUpdateRdsElements>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetMbUpdateRdsElementsResult 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">
  <count xmlns="">3</count>
  </SetMbUpdateRdsElementsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetMbUpdateRdsElements" :
{
"tMbUpdate" :
{
"id" : "KFOHMMHOOKDGGOAEBBCEBJODBGLAKMMEJINOJHEBHNNLKOBA!M!S!MbUpdHEDHKNHOOKDGGOAEOENMGFPFOPNBOBOEDLJHBBFFCGEPLEBD"
},
"tArg" :
{
"rdsInfo" :
{
"rds" :
{
"id" : "KFOHMMHOOKDGGOAEBBCEBJODBGLAKMMEJINOJHEBHNNLKOBA!M!S!NGACPINHOOKDGGOAEJMHOHAHAAKNNFOAEBLDIIDLOKCDKNJFE"
}
},
"op" : "Add",
"includeChildren" : "true",
"elements" :
{
"its" :
{
"it" :
[
{
"key" : "1"
},
{
"key" : "2"
},
{
"key" : "3"
}
]
}
}
}
}
}

JSON response:

{
"SetMbUpdateRdsElementsResult" :
{
"count" : "3"
}
}
public static SetMbUpdateRdsElementsResult SetMbUpdateRdsElements(string updMon, string rdsMon, RdsKeys elKeys)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetMbUpdateRdsElements()
{
tArg = new SetMbUpdateRdsElementsArg()
{
rdsInfo = new RdsUpdateInfo() { rds = new RdsId() { id = rdsMon } },
op = ListOperation.Add,
includeChildren = true,
elements = elKeys
},
tMbUpdate = new MbUpdateId() { id = updMon }
};
// Add MDM dictionary elements to update
var tResult = somClient.SetMbUpdateRdsElements(tSet);
return tResult;
}

See also:

Working with MDM Dictionaries