Creating Business Feature Templates
The Project module tab in Real-Time Designer contains a Templates sub-tab for defining the properties of the business feature template and its parameters.
The following Template Properties options are available on the ribbon:
Generate Template Package: Opens the Save File window. Specify the file name and select the location where want to save it as a business feature template. Business feature templates have a *.tproj extension. After a business feature template is saved, an Assembly (.NET DLL) is generated under the Generated Business Features Templates folder. This folder contains generated folders whose folder name contains the name of the template project and its version, as shown in below:
The generated folders location can be customized using the PODesigner branch setting in the System Settings window called Customized Generated Files Directory.
Each such folder contains a *.dll file that indicates the name of generated template in the following format: <template name>.BFT.dll.
Save Project as Template: Saves a regular project as a business feature template. Use this feature to save an existing project as a template.
Several other methods are available for saving a project as a business feature template. You can also access this feature from the Quick Access toolbar, or by clicking the Quick Access icon, selecting the Save As option and then saving the template as a *.tproj file.
New Template Parameter: Specifies the properties for each parameter in the template.
The tree contains the following Templates branches:
Feature Template Properties: Specifies the properties of the template itself, as described in Feature Template Properties
Template Parameters: Specifies the placeholder parameters in the template. These parameters are abstract objects that can be used in the project's logic, but they do not point to actual concrete objects. For details, see Template Parameters
You define the following properties in the Feature Template Properties branch:
Current Version: The version of the template in the form xxx.xxx.xxx where x is a digit. The value that you enter here must be unique in the system. This value should be incremented each time you generate the template. The default is 001.001.001.
Version Comment: A descriptive comment about this version of the template.
Version history is automatically updated each time you generate the template package, and can be viewed in the Versions History area:
Each time a template is generated with a new version, its corresponding *.dll is generated in its own folder, as the version number is part of the folder name.
If the Write to Application Data parameter under the Designer > General branch in the System Settings window is set to True, template folders and their DLLs are stored under the Application Data folder on your machine. For details, refer to the General section in the System Administration Guide.
Template Parameters
Template parameters act as placeholder parameters in the business feature template. They are abstract objects that can be used in the project's logic; they do not point to actual concrete objects. A template can have an unlimited number of template parameters. Each template parameter must have a unique name in the template.
The following properties are defined for each template parameter:
Type: Specifies the parameter type, such as Boolean, DateTime, Decimal and so on.
The type can be any business entity type defined in the project, a referenced project or any other object in Designer (such as a callout, workflow, KPI and so on).
Description: A description of the parameter and its purpose in the template logic.
Fill-In Directions: Provides directions about which kind of element can be used as a concrete element when consuming the template project.
Example
Consider an example where the new template parameter type is a button screen element.
In this example, the button screen element is named Enter Credit Card Details Button:
Selecting the Template Parameters option displays a list of all the parameters defined in the template from which you can choose. For example, the window below shows the defined Enter Credit Card Details Button parameter.
After selecting the Enter Credit Card Details Button template parameter, all events exposed by the button screen element type are displayed. For example, Clicked:
The events displayed are based on the type of parameter used in the template. For example, a button screen element exposes certain methods, events and properties, one of which is the Clicked event (see above).
In contrast, a callout parameter type exposes a different set of methods, events, and properties, such as Closed and Showed: