Hosted Floating Workflow

Greetings,

I have been trying to implement hosted floating licenses and the documentation isn’t the best on exactly the workflow. My question is, after the initial SetLicenseKey() → ActivateLicense(), is it necessary to call ActivateLicense() on subsequent starts of the app to “check out” a license, or does IsLicenseGenuine() handle the “check out”? From what I can tell debugging, I only need to call IsLicenseGenuine() but I wanted to confirm. My example workflow:

LexActivator.SetProductData(LicUtil.__productdat)
LexActivator.SetProductId(LicUtil.__productid, PermissionFlags.LA_USER)
LexActivator.SetLicenseCallback(LicUtil.servsync_callback)

status = LexActivator.IsLicenseGenuine()  

if status==LexStatusCodes.LA_FAIL:
    #ask user for license key
    LexActivator.SetLicenseKey(key)
    LexActivator.ActivateLicense() 
elif status==LexStatusCodes.LA_OK:
    #continue with launch
    #DOES A LICENSE GET "CHECKED OUT" HERE AUTOMATICALLY?

Thank you.

Nevermind, I believe I zombied the license and upon next startup of the app, it behaved as if it had a “checkout” already.

Upon further investigation, it seems the workflow to determine if we have a prior activated hosted floating license on startup is if IsLicenseGenuine() returns LA_FAIL but GetLicenseKey() returns a non-empty string, then do an ActivateLicense() in order to try to “check out” a license.

Yes, you figured this out right. In floating licenses you have to activate the license on each startup.