This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Embedded
- :
- FlexNet Embedded Knowledge Base
- :
- How do you add a flag so FlxCapabilityResponseGetVendorDictionary detects returns at runtime?
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
How do you add a flag so FlxCapabilityResponseGetVendorDictionary detects returns at runtime?
How do you add a flag so FlxCapabilityResponseGetVendorDictionary detects returns at runtime?
Summary
How do you add a flag so FlxCapabilityResponseGetVendorDictionary detects returns at runtime?Question
Using the FlexNet Embedded 2014.09 client to obtain a license from an instance of FlexNet Operations, when creating the license model, how do you add a Boolean field to indicate whether the license can be returned or not, as well as a string field for any additional info? The need here is to query these fields so as to prevent/allow the returning of licenses at run-time. How can this information be queried from the client?Answer
This can be done by implementing the com.flexnet.opsembedded.publicapi.DeviceRequestHandler class. You can use this to add something to the response.Attached is some sample code based on the samples that ship with FNO (CustomDeviceRequestHandler.java). All of the test stuff has been stripped out and just the handler return test is included as the key value pair. It is also possible to use the license model vendor string to add a value, either at entitlement time or license model specific if needed (just need to set when to create the string in the license model).
With this situation, first need to add a custom attribute to the FNO instance (per the DeviceRequestHandler class, which should be modified for the specific needs before doing a "flexnet site make" and then restarting the FNO server to implement the modifications).
Then, via the FNO admin console, add it to the license model (see attached license_model.jpg)
Next, created an entitlement that sets the value (see attached entitlement.jpg)
Then, back at your client, modify the capabilityrequest example to display the vendor string:
if ( !FlxPublisherAcquireLicenses(
clientObjects->publisher,
&license,
clientObjects->licenseSources,
survey,
version,
1,
0,
0,
error) )
{
DisplayErrorString(_T("acquiring survey license"), error);
return FLX_FALSE;
}
printf("Vendor string: %s\n", FlxLicenseGetVendorString(license));
INFO: number of features loaded from capability response: 4
Vendor string: true
INFO: acquired license
INFO: deleted client objects
No ratings