SetSeg

Syntax

SetSegResult SetSeg(SegId tSeg, SetSegArg tArg)

Parameters

tSeg. Cube segment instance moniker.

tArg. Operation execution parameters.

Description

The SetSeg operation changes cube segment metadata.

Comments

To execute the operation, in the tAlg field specify segment instance moniker, and in the tArg.pattern field specify the pattern that will be used to change metadata, and in the tArg.meta field specify metadata to be set. One can also determine the tArg.metaGet pattern to get metadata after it was changed. The moniker can be obtained after executing the OpenSeg operation.

To save changes, use the SaveObject operation.

The operation results in the updated metadata if the tArg.metaGet field was defined.

Example

Below is the example of changing cube segment activity. The request contains moniker of opened segment instance and activity value to be set. The response contains updated information about segment activity value to be set.

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">
<SetSeg xmlns="http://www.fsight.ru/PP.SOM.Som">
<tSeg xmlns="">
  <id>FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNOKHLMBOCLDPFOAECLPBNGOGGLICIMAEJIEMIFKOCDIBJKCM</id>
  </tSeg>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <active>true</active>
  </pattern>
<meta>
<data>
  <active>false</active>
  </data>
  </meta>
<metaGet>
  <obInst>true</obInst>
  <active>true</active>
  </metaGet>
  </tArg>
  </SetSeg>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetSegResult 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>FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNOKHLMBOCLDPFOAECLPBNGOGGLICIMAEJIEMIFKOCDIBJKCM</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="5" hf="0">
  <i>OBJ317192</i>
  <n>Cube segment</n>
  <k>317192</k>
  <c>1295</c>
  <p>317162</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>0</dirty>
<data>
  <active>0</active>
  </data>
  </meta>
  </SetSegResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetSeg" :
{
"tSeg" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNOKHLMBOCLDPFOAECLPBNGOGGLICIMAEJIEMIFKOCDIBJKCM"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"active" : "true"
},
"meta" :
{
"data" :
{
"active" : "false"
}
},
"metaGet" :
{
"obInst" : "true",
"active" : "true"
}
}
}
}

JSON response:

{
"SetSegResult" :
{
"id" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNOKHLMBOCLDPFOAECLPBNGOGGLICIMAEJIEMIFKOCDIBJKCM"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "5",
"@hf" : "0",
"i" : "OBJ317192",
"n" : "Cube segment",
"k" : "317192",
"c" : "1295",
"p" : "317162",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"data" :
{
"active" : "0"
}
}
}
}
public static SetSegResult SetSeg(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetSeg()
{
tArg = new SetSegArg()
{
pattern = new SegMdPattern()
{
active = true
},
meta = new SegMd()
{
data = new SegData()
{
active = false
}
},
metaGet = new SegMdPattern()
{
active = true
}
},
tSeg = new SegId() { id = moniker }
};
// Change cube segment settings
var result = somClient.SetSeg(tSet);
return result;
}

See also:

Working with Cubes