OpenSeg

Syntax

OpenSegResult OpenSeg(OdId tOb, OpenSegArg tArg)

Parameters

tOb. Moniker of repository object that is a cube segment.

tArg. Operation execution parameters.

Description

The OpenSeg operation opens a cube segment.

Comments

To execute the operation, in the tOb field specify the object that is a segment, and in the tArg field specify opening parameters. The object moniker can be obtained on executing the GetObjects operation. In the tArg field one can specify opening mode (view or edit) and a pattern to get metadata. The pattern is used to specify the information that should be obtained on opening. The operation results in the moniker of opened segment instance and metadata if the tArg.metaGet field was defined on executing the operation.

Further work is executed using the GetSeg and SetSeg operations. To save changes, use the SaveObject operation.

To close the opened segment instance, use the CloseSeg operation.

Example

Below is the example of opening cube segment for edit. The request contains moniker of repository object that is a segment. The response contains the obtained moniker of opened segment instance.

The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier article.

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">
<OpenSeg xmlns="http://www.fsight.ru/PP.SOM.Som">
<tOb xmlns="">
  <id>FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!317192</id>
  </tOb>
<tArg xmlns="">
<args>
  <bind>true</bind>
  <openForEdit>true</openForEdit>
  </args>
  </tArg>
  </OpenSeg>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"OpenSeg" :
{
"tOb" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!317192"
},
"tArg" :
{
"args" :
{
"bind" : "true",
"openForEdit" : "true"
}
}
}
}

JSON response:

{
"OpenSegResult" :
{
"id" :
{
"id" : "FLEDMHBOCLDPFOAEDMFBLHBLOEJDMKEEKKHHKBBDHHIFPONM!M!S!CNOKHLMBOCLDPFOAECLPBNGOGGLICIMAEJIEMIFKOCDIBJKCM"
},
"readOnly" : "0"
}
}
public static OpenSegResult OpenSeg(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tOpen = new OpenSeg()
{
tArg = new OpenSegArg()
{
args = new SegOpenArgs()
{
bind = true,
openForEdit = true
}
},
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
// Open cube segment
var tResult = somClient.OpenSeg(tOpen);
return tResult;
}

See also:

Working with Cubes