Maintenance Policies

A maintenance policy can be used to configure how the end-user can update the software (product). You can add restrictions on the major version, minor version and duration for which the updates will be available. The maintenance policy once created can be linked to the licenses.

Maintenance policy properties

The maintenance policy has the following properties:

Name

Name of the maintenance policy.

Subscription Interval

To define a recurring subscription, use the subscriptionInterval property to specify the interval and the subscriptionStartTrigger to determine when that duration begins.

Subscription Interval accepts intervals using ISO8601 durations (P1Y, P3M10D, P30D). This automatically accounts for varying lengths of months and years.

Subscription Start Trigger

Subscription Start Trigger controls when the subscription period begins:

  • License Creation - The subscription starts when the license is created, useful for aligning with the purchase date.
  • License Activation - The subscription starts when the license is activated for the first time.

Allow Major Version Updates

If set to true then all the major version updates will be allowed till the license maintenance expires.

Allow Minor Version Updates

If set to true then all the minor version updates will be allowed till the license maintenance expires.

Using maintenance policies

After you have created a maintenance policy and linked it with the license, you need to call the following LexActivator functions in your code after calling SetProductId() function:

SetReleaseVersion("1.2.3");

SetReleasePublishedDate();

The allowed version format syntax is $MAJOR.$MINOR.$PATCH.$BUILD. So, only the following three formats are allowed:

  • x.x - $MAJOR.$MINOR
  • x.x.x - $MAJOR.$MINOR.$PATCH
  • x.x.x.x - $MAJOR.$MINOR.$PATCH.$BUILD

It must only contain dot-separated digits e.g. 1.2, 1.2.3, 1.2.3.4, etc.

The version set in this function is stored in the license as "CurrentReleaseVersion" property and in the activation as "ReleaseVersion" property. If the license has more than one activation the "CurrentReleaseVersion" property of the license will store the max release version.

Using max allowed release version

In case your use case is simple and you want to allow updates up to a particular max version, then you don't need to create any maintenance policy. Just set the "MaxAllowedReleaseVersion" property of the license to the max version up to which you want to allow updates. And in your application just call SetReleaseVersion("x.x.x") the function.

Renewing maintenance

Whenever you create a license and link a maintenance policy with subscriptionInterval say 365 days, you will see a property in the license resource named maintenanceExpiresAt. It is a read-only, computed property and determines the time when the license maintenance will expire.

If the license maintenance policy subscriptionStartTrigger is set to license-creation, the maintenanceExpiresAt property will be populated with the date on which the license maintenance will expire starting from the time when the license was created.

If the license maintenance policy subscriptionStartTrigger is set to license-activation, the maintenanceExpiresAt property will be null till the license is activated, as the license maintenance will start expiring after it is used.

To renew the license maintenance you need to invoke the license maintenance renew endpoint or renew it through the license page in the admin portal. It extends the license maintenance expiry by its maintenance policy's subscriptionInterval.

Possible use cases

  • Lifetime free updates – Don’t create any policy or create the policy with the following values:
    subscriptionIntervalnull
    AllowMajorVersionUpdatestrue
    AllowMinorVersionUpdatestrue

  • Lifetime minor version updates
    subscriptionIntervalnull
    AllowMajorVersionUpdatesfalse
    AllowMinorVersionUpdatestrue

  • One-year major version updates
    subscriptionIntervalP1Y
    AllowMajorVersionUpdatestrue
    AllowMinorVersionUpdatestrue

  • One-year minor version updates
    subscriptionIntervalP1Y
    AllowMajorVersionUpdatesfalse
    AllowMinorVersionUpdatestrue

  • No updates
    subscriptionIntervalnull
    AllowMajorVersionUpdatesfalse
    AllowMinorVersionUpdatesfalse
Revoking LicensesOverview
Last updated: