OpenMbLicenseResult OpenMbLicense(MbId tMb, OpenMbLicenseArg tArg)
tMb. Repository connection moniker.
tArg. Operation execution parameters.
The OpenMbLicense operation gets license instance.
When working with platform tools, in most cases licenses are checked out and checked in automatically on license server. In some cases, for example, when working with the security manager, one require force checkout of license. To execute the operation, in the tMb field specify repository connection moniker, and in the tArg.featureType field specify type of checked out license. The moniker can be obtained on executing the OpenMetabase operation.
The operations results in the checked out license instance moniker.
To check in the used license instance, use the CloseMbLicense operation.
Below is the example of getting the license required for security manager work. The request contains the repository connection moniker and the required license type. The response contains moniker of the obtained license instance.
{
"OpenMbLicense" :
{
"tMb" :
{
"id" : "COCEMLBIAJABGOAEBPGPAMOAJHNNIHDENJHCPANBHHDMNFPG!M"
},
"tArg" :
{
"featureType" : "Adm"
}
}
}
{
"OpenMbLicenseResult" :
{
"id" :
{
"id" : "COCEMLBIAJABGOAEBPGPAMOAJHNNIHDENJHCPANBHHDMNFPG!M!S!MbLicHKGDFNBIAJABGOAEAHPAJBPDEDCPLHJEJKKCALFPNECMCIBB"
}
}
}
public static OpenMbLicenseResult OpenMbLicense(string moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOp = new OpenMbLicense()
{
tArg = new OpenMbLicenseArg()
{
featureType = LicenseFeatureType.Adm
},
tMb = new MbId() { id = moniker }
};
// Check out license for working with the security manager
var result = somClient.OpenMbLicense(tOp);
return result;
}
See also: