String Replacement for FlexNet Embedded Licensing
Detailed instructions follow this quick reference for the model.
Data Model
The following table is a quick reference for the model.
Data Model
|
|
|
|
account (both types)
|
|
|
partner (both types)
|
|
|
manufacturer (order line type)
|
|
|
productLine (order line type)
|
|
|
orderLine (order line type)
|
|
|
device (device type)
|
|
•
|
series
— name — description |
|
|
fulfillmentDate (datetime) (both types)
|
|
|
mappedQuantity (number) (order line type)
|
|
The iid property is the internal (System) ID of the owning entity.
FlexNet Embedded License model string replacement uses FreeMarker with the above data model and the value from the license model as the template. The full FreeMarker manual is a useful reference, but some examples and a quick guide will be provided here.
Examples
|
•
|
Licensed to ${account.name} |
|
•
|
minutes=${orderLine.udfs["MINUTES"]} |
|
•
|
${device.model.series.name} |
|
•
|
${fulfillmentDate?date?string.short} |
|
•
|
${account.udfs["TIER"]!"Basic"} |
General Comments
Not all parts of the data model are available for all license models. For example, ${device} will be missing in an order line license model, and ${orderLine} will be missing in a device license model. Remember also that if a device is unassigned, then ${account} will be null when trying to generate the base license for that device.
UDFs are accessed through a hash property of the object on which the UDF is set. The key to the hash is the UDF code. Some of the above examples demonstrate usage.
As you may guess from the examples, FreeMarker interpolation is triggered by ${} enclosing an expresssion. Expressions use dotted path notation to navigate a data model.
It is an error to call for something that is missing. (Null and unset are both interpreted as missing.) That error will cause a failure to generate the license. However, FreeMarker gives control over this behavior. If you want to proceed without error when a value is missing then you can use ! as in the last example. The FreeMarker manual gives details.
Dates, times, and numbers use default formatting, but the templating system gives control over the format. Note that a date does not have a time. This is different from a timestamp, which has a date and a time. Values which are dates, times, or numbers are called out in the data model reference above. Although formatting is highly configurable, the most common use cases will probably be served by the built-in date formats.