My developed module keeps working when Trial mode expires

I have developed a custom module and I am on the licensing process of this module. For this:

  1. I activated an Ignition platform license on my Ignition gateway and observed every Ignition module's license status changed from Trial to Activated, except for my developed module that was installed on the gateway without any license.

  2. Then I generated a license for my module using IA tool, and activated the generated 6-character license on the gateway. As a result my custom module's licensing status changed from Trial to Activated.

Above-mentioned two observations confirms that my module works properly with the licensing process. However, there is an issue when I test my module without license (on trial mode):

In this case, since I have a platform license activated on the gateway, I see the "License Incomplete" status on my gateway, which correctly reflects the existence of my unlicensed (Trial mode) custom module on the gateway. So I expect that my module stops working after trial mode ends, but it doesn't happen and I am still able to execute my developed scripting (System) functions on a running Perspective session. (FYI: My module is a scripting function library and contains 10 scripting functions with the prefix system.myLib)

Thank you in advance for any ideas you may have

The licensing system does not do enforcement for you. It sends notifications of licensing status changes to the appropriate methods on your hook classes, and you should be saving that information for your module to use. Wherever you want to enforce the license (not necessarily for everything), you must check the most recent state received.

Thanks for your prompt response. So, how should I modify the hook classes to enforce the license/ checking the most recent state received?

Normally you would save your state in a field in the hook class (static field, perhaps), and either provide the hook class to all of your scripting class instances or provide a static method on your hook classes to look up the state.

Thank you for your help.