Consuming Executions

One of the license types that you can define for a Feature is Execution Count. A license of this type contains a pool of executions from which the Feature consumes one or more executions as the protected application runs.

A typical use for this type of license is to assign a different "cost" in executions for the different functions that an application can perform. All the executions are consumed from a single pool of executions in the license. For example, the customer could be charged one execution for a save operation and three execution for a print operation. This provides an alternative to the method of assigning a different Feature ID and providing a separate executions pool for each action. With different Feature IDs, the customer might deplete all the executions for one Feature while unused executions remain for other Features.

You can assign a cost in executions for a given Feature using one of the following methods:

>Assign <execution_count_to_consume> in the login scope for the protection key. This tag should state the number of executions to consume for a single login.

>Assign <execution_count_to_reserve> in the login scope for the protection key, and assign <execution_count_to_consume> by calling UpdateSession.

In this case, <execution_count_to_reserve> would state the number of executions that the License Manager should hold in reserve for the application at the time of login. As the user works with the application, the application can call UpdateSession. and update <excution_count_to_consume> as required.

When the application logs out from the protection key, only the last value specified by <excution_count_to_consume> is deducted from the execution count in the license. Any unconsumed executions from the reserve are returned to license.

By reserving executions at the time of login to the protection key, you can ensure that the user has enough available executions to complete the desired task. If the license does not contain the number executions that the application is attempting to reserve, the application will be terminated.

NOTE   Calling LoginScope automatically consumes one execution. If you use <execution_count_to_consume> to consume additional executions, the total number of executions consumed will be the number of executions specified in that tag.

Related Topics

UpdateSession

LoginScope