AddToMbUpdate

Syntax

AddToMbUpdateResult AddToMbUpdate(MbUpdateId tMbUpdate, AddToMbUpdateArg tArg)

Parameters

tMbUpdate. Moniker for working with repository update.

tArg. Operation execution parameters.

Description

The AddToMbUpdate operation adds repository objects to update.

Comments

To execute the operation, in the tMbUpdate field specify update moniker, and in the tArg field specify parameters for adding objects. The moniker can be obtained on executing the OpenMbUpdate operation.

If the added object or its child objects are objects of the class that updates data and metadata separately:  table, external table, log, MDM dictionary, composite MDM dictionary, time series database, cube segment, in this case the response contains the list of objects, for which the method field should be set to some value. In this case the AddToMbUpdate operation should be executed again by sending the original list of objects including the objects, for which the method update method is set.

If the added objects do not contain objects of the specified classes, during operation execution the objects are added to update, and the operation results in the empty list in the unresolved field.

Example

Below is the example of adding two repository objects to update. Object keys are specified, the first object is added without child objects, update method is set for the second object.

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">
<AddToMbUpdate xmlns="http://www.fsight.ru/PP.SOM.Som">
<tMbUpdate xmlns="">
  <id>BHFPHCKJHLCGGOAEKNPALNGBAOKOOMDEGKCPBIMCFPDJOIDF!M!S!MbUpdFEFLAGKJHLCGGOAEADOHGJOMHPENBLJEFKPAAPEMDIMFAIMP</id>
  </tMbUpdate>
<tArg xmlns="">
<objs>
<it>
  <key>198414</key>
  <withChildren>false</withChildren>
  </it>
<it>
  <key>198421</key>
  <withChildren>false</withChildren>
  <method>All</method>
  </it>
  </objs>
  </tArg>
  </AddToMbUpdate>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"AddToMbUpdate" :
{
"tMbUpdate" :
{
"id" : "BHFPHCKJHLCGGOAEKNPALNGBAOKOOMDEGKCPBIMCFPDJOIDF!M!S!MbUpdFEFLAGKJHLCGGOAEADOHGJOMHPENBLJEFKPAAPEMDIMFAIMP"
},
"tArg" :
{
"objs" :
{
"it" :
[
{
"key" : "198414",
"withChildren" : "false"
},
{
"key" : "198421",
"withChildren" : "false",
"method" : "All"
}
]
}
}
}
}

JSON response:

{
"AddToMbUpdateResult" :
{
"unresolved" : ""
}
}
public static AddToMbUpdateResult AddToMbUpdate(string moniker, uint[] keys)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tAdd = new AddToMbUpdate()
{
tArg = new AddToMbUpdateArg()
{
objs = new AddToUpdObjParams[]
{
new AddToUpdObjParams()
{
key = keys[0],
withChildren = false
},
new AddToUpdObjParams()
{
key = keys[1],
withChildren = false,
method = MbUpdateMethod.All
}
}
},
tMbUpdate = new MbUpdateId() { id = moniker }
};
// Add objects to update
var result = somClient.AddToMbUpdate(tAdd);
return result;
}

See also:

Working with Repository