OpenRdsDatabaseResult OpenRdsDatabase(OdId tOb, OpenRdsDatabaseArg tArg)
tOb. Moniker of repository object that is MDM repository.
tArg. Operation execution parameters.
The OpenRdsDatabase operation opens MDM repository.
To execute the operation, in the tOb field specify moniker of the repository object that is MDM repository, and in the tArg field specify opening parameters. The operation results in the moniker of opened MDM repository instance and metadata if the tArg.metaGet field was defined.
Further work is executed using the GetRdsDatabase and SetRdsDatabase operations.
To close the MDM repository instance, use the CloseRdsDatabase operation.
Below is the example of opening MDM repository for edit. The request contains the moniker of the repository object that is MDM repository. The response contains the moniker of MDM repository instance opened for edit.
The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"OpenRdsDatabase" :
{
"tOb" :
{
"id" : "S1!M!219759"
},
"tArg" :
{
"args" :
{
"bind" : "true",
"openForEdit" : "true"
}
}
}
}
{
"OpenRdsDatabaseResult" :
{
"id" :
{
"id" : "S1!M!S!RD1"
}
}
}
public static OpenRdsDatabaseResult OpenRDSDatabase(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenRdsDatabase()
{
tArg = new OpenRdsDatabaseArg()
{
args = new RdsDatabaseOpenArgs()
{
bind = true,
openForEdit = true
}
},
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
//Open MDM repository
var tResult = somClient.OpenRdsDatabase(tOpen);
return tResult;
}
See also: