cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dstrigl
Level 3

Capability request with negative count doesn't have any effect!

Dear revenera-Community,

I am trying the following example (as also decribed in the FNE_DotNetXTUserGuide_2019R2.pdf):

I have a trusted storage with the following feature(s):

INFO: Features loaded from trusted storage: 1
FeatureA, 1.0, Count=1, Expiration=permanent, Final Expiration=permanent, Entitlement Expiration=permanent, Vendor String=VendorStr, Issuer=XYZ, Issued=Donnerstag, 9. Juli 2020 00:00:00, Notice=Notiz2, SN=987654, Start=Mittwoch, 8. Juli 2020 00:00:00, License Server Instance=Default Valid for acquisition

Now I am sending a Capability Request with the following options:

ICapabilityRequestOptions options = licensing.LicenseManager.CreateCapabilityRequestOptions();

options.AddDesiredFeature(new FeatureData("FeatureA", "1.0", -1));

options.ForceResponse = true;

As you can see, I am using a count of "-1" to remove the current feature "FeatureA" from my trusted storage (as explained in the doc).

Now I am getting the a response with the following feature collection:

FeatureCollection Count = 1 FlxDotNetClient.IFeatureCollection
{
FeatureA, 1.0, Count=1, Expiration=permanent, Final Expiration=permanent, Entitlement Expiration=permanent, Vendor String=VendorStr, Issuer=XYZ, Issued=Freitag, 10. Juli 2020 00:00:00, Notice=Notiz2, SN=987654, Start=Donnerstag, 9. Juli 2020 00:00:00
Valid for acquisition
}

I would exspect to get an empty feature collection and also an empty trusted storage after processing the response.

But the trusted storage is the same as bevore after processing the response.

Does I am understand something wrong?

Regards,

Daniel.

 

 

0 Kudos
(9) Replies
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi Daniel,

By Default FlexNet Embedded uses a "replacement" license strategy.  If you request Qty 2 you will get 2 and if you then request 3 you will get a total of 3 (not 5).  If you want to change the Qty you currently have by a positive or negative count you need to set the Incremental flag in the capability request.  If you have Qty 1 and you want to reduce your quantity by 1 set the incremental flag and request a qty of -1.  If you are looking to return the total qty of licenses you have you can simply request a Qty of 0.

Thanks,  

0 Kudos

Dear jberthold,

thanks for your fast response.

I tried both of your hints:

  • ICapabilityRequestOptions options = licensing.LicenseManager.CreateCapabilityRequestOptions();

    options.Incremental = true;

    options.AddDesiredFeature(new FeatureData("FeatureA", "1.0", -1));

    ...
  • ICapabilityRequestOptions options = licensing.LicenseManager.CreateCapabilityRequestOptions();

    options.AddDesiredFeature(new FeatureData("FeatureA", "1.0", 0));

    ...

But in both cases I get the following response:

  Name Value Type

â—¢FeatureCollectionCount = 1FlxDotNetClient.IFeatureCollection {L.cd68dc555bf1729365baa80ce61d04384}
 â–¶ [0]{FeatureA, 1.0, Count=1, Expiration=permanent, Final Expiration=permanent, Entitlement Expiration=permanent, Vendor String=VendorStr, Issuer=XYZ, Issued=Freitag, 10. Juli 2020 00:00:00, Notice=Notiz2, SN=987654, Start=Donnerstag, 9. Juli 2020 00:00:00 Valid for acquisition }FlxDotNetClient.IFeature {L.c7672b91a9c58adf07c6f83d7255d8c83}

 

and the trusted storage looks like before!

I have no idea what's going wrong here ...

Regards,

Daniel.

 

0 Kudos
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi Daniel,

When you requested the Qty of "0" licenses from the server did you have the incremental flag set to false?  Both methods should work just fine.  I just tested and have attached screenshots of both using the Capability Request and View examples provided in the toolkit.  Are you sending your capability request to a Cloud or Local License server?  

Thanks,

0 Kudos

Hi jberthold,

I just tried again:

> When you requested the Qty of "0" licenses from the server did you have the incremental flag set to false?

Yes, but same result. The response comes with 1 feature and the trusted storage keeps in the same state!

Is there - maybe - something in the settings (of the license model or entitlement)?

Regards,

Daniel.

 

0 Kudos
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi Daniel,

Something is not right.  Are you requesting features from a Cloud or Local License Server (not that it matters, just curious)?    One thing you could try is to delete the Trusted Storage files and then repeat your tests.   Default location on Windows for the hidden trusted storage files is C:\Users\username\Documents.   If you like you can add me to your FlexNet Operations Instance (jberthold@revenera.com) and I can take a look at your setup.  Also I would recommend trying your test with the out of the box Capability Request example if  you haven't already done so.

Thanks,

0 Kudos

Thanks! I added you to our FlexNet Operations Instance and send you a e-mail with the sample application.
0 Kudos
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi Daniel,

If this is your UAT Environment you will need to trigger me a password reset email as I have not yet received any notification.  

Thanks,

0 Kudos
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi Daniel,

It looks like you tried to add me to the Product & License Center rather than your FlexNet Operations Cloud Instance.  Could you please add me as a Producer user to the MYORG Account in FlexNet Operations and trigger me a password reset email?

Thanks,

0 Kudos

Sorry, now you should part of our MYORG.

Regards,

Daniel.

0 Kudos