SetRds

Syntax

SetRdsResult SetRds(RdsId tRds, SetRdsArg tArg)

Parameters

tRds. MDM dictionary instance moniker.

tArg. Parameters for changing metadata.

Description

The SetRds operation changes MDM dictionary metadata.

Comments

This operation enables the user to change the following information about MDM dictionary structure:

To execute the operation, in the tRds parameter specify the opened dictionary instance moniker, and in the tArg parameter specify parameters of change. The moniker can be obtained on executing the OpenRds operation. In the tArg.pattern field specify the pattern that will be used to make changes, and in the tArg.meta field specify the updated metadata. To save changed MDM dictionary after the SetRds operation, execute the SaveObject or SaveObjectAs operation.

The SetRds operation results in the moniker of the changed dictionary and the requested metadata, if the tArg.metaGet field was defined on executing the operation.

Example

The example of adding a level to structure of an MDM dictionary. The request contains the dictionary moniker, the pattern indicating whether a level must be created, and metadata of the level to be created. The response contains information about all dictionary levels.

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">
<SetRds xmlns="http://www.fsight.ru/PP.SOM.Som">
<tRds xmlns="">
  <id>S1!M!S!N2</id>
  </tRds>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <levels>Add</levels>
  </pattern>
<meta>
<levels>
<its>
<it>
  <k>-1</k>
  <id>LEVEL_</id>
  <n>Additional</n>
  <vis>true</vis>
  </it>
  </its>
  </levels>
  </meta>
<metaGet>
  <obInst>true</obInst>
  <levels>Get</levels>
  </metaGet>
  </tArg>
  </SetRds>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetRdsResult 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>S1!M!S!N2</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="4" hf="0">
  <i>FACT_ELEMENTS</i>
  <n>Dictionary with indicators</n>
  <k>219797</k>
  <c>3076</c>
  <p>5611</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>1</dirty>
<levels>
<its>
<it>
  <k>1</k>
  <id>LEVEL_</id>
  <n>Additional</n>
  <vis>1</vis>
  </it>
  </its>
  </levels>
  <timeDependency>TimeReadOnly</timeDependency>
  <eeCallback />
  <isHierarchical>1</isHierarchical>
  <isSecured>0</isSecured>
  <manageVisibility>0</manageVisibility>
  <isCompound>0</isCompound>
  <isBigDictionary>0</isBigDictionary>
  <hasMandatoryAccess>0</hasMandatoryAccess>
  <hasDimMultipleValues>1</hasDimMultipleValues>
  <defaultElementKey>-1</defaultElementKey>
  <isAbacSecured>0</isAbacSecured>
  </meta>
  </SetRdsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetRds" :
{
"tRds" :
{
"id" : "S1!M!S!N2"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"levels" : "Add"
},
"meta" :
{
"levels" :
{
"its" :
{
"it" :
[
{
"k" : "-1",
"id" : "LEVEL_",
"n" : "Additional",
"vis" : "true"
}
]
}
}
},
"metaGet" :
{
"obInst" : "true",
"levels" : "Get"
}
}
}
}

JSON response:

{
"SetRdsResult" :
{
"id" :
{
"id" : "S1!M!S!N2"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "4",
"@hf" : "0",
"i" : "FACT_ELEMENTS",
"n" : "Dictionary with indicators",
"k" : "219797",
"c" : "3076",
"p" : "5611",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "1",
"levels" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "LEVEL_",
"n" : "Additional",
"vis" : "1"
}
]
}
},
"timeDependency" : "TimeReadOnly",
"eeCallback" : "",
"isHierarchical" : "1",
"isSecured" : "0",
"manageVisibility" : "0",
"isCompound" : "0",
"isBigDictionary" : "0",
"hasMandatoryAccess" : "0",
"hasDimMultipleValues" : "1",
"defaultElementKey" : "4294967295",
"isAbacSecured" : "0"
}
}
}
public static SetRdsResult ChangeRDSStructure(RdsId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetRds()
{
tArg = new SetRdsArg()
{
pattern = new RdsMdPattern()
{
levels = ListOperation.Add
},
meta = new RdsMd()
{
levels = new RdsLevels()
{
its = new RdsLevel[]
{
new RdsLevel()
{
k = uint.MaxValue,
id = "LEVEL_" ,
n = "Additional" ,
vis = true
}
}
}
},
metaGet = new RdsMdPattern()
{
levels = ListOperation.Get
}
},
tRds = moniker
};
//Change dictionary structure
var result = somClient.SetRds(tSet);
return result;
}

See also:

Working with MDM Dictionaries