Text Generator Builder
Compose Enterprise is going through a design update. The illustrations on this page might be of the old design, but the information is up to date. Thank you for your patience during this update!
A text generator in Compose is an instance that can generate text documents based on form and workflow data. This means that documents like XML, HTML, Excel/Word can be created using a text generator. The Compose Scripting API is available to the text generator scripting environment.
The Text Generator Builder has two main sections; Settings and Script. Before entering the Text Generator Builder you need to create a new or open an existing text generator (see the https://composetogo.atlassian.net/wiki/spaces/CNGD/pages/1835220 documentation).
Settings
The Settings section consists of a Versions panel and an Input variables table. The variables each have their own Properties menu accessed by double-clicking on them.
Versions
Versions | ||
---|---|---|
Start to edit from selected version | Your draft settings will be overwritten with the settings from the selected version. | |
View selected version | Select a version and view the settings/script in a read-only view. | |
New version | Version the text generator to use it in a workflow. |
Input variables
Input variables | ||
---|---|---|
Create | Create a new input variable by clicking the Create button, give it a name and click OK. Note: The variable name can't start with a capital letter, contain white-space characters and must have a length of 1 to 40 characters. | |
Delete | Delete variables by selecting the variable and clicking Delete. | |
Modify | Select the variable and click Modify to view/edit the properties in Properties menu. |
Variable Properties
Variable Properties | |
---|---|
Name | Unique name of the input variable that will be accessible to the generation script. |
Optional | To use the variable in text generation, can be set as optional. |
Type | Choose from Form answer based, Data type variable or Option source variable. |
Validation | If Type is set to either Data type variable or Option source variable, you may set a validation to the variable. Learn more about validations in this user guide. |
Form answer based properties | |
Form Selector Window | Bind specific forms and versions of forms to the text generator by clicking Add Form. This window will display all forms and the versions of the forms, in which the variable can be connected to question answers. Select a form and click Delete to delete it. |
Versions panel | When a form with multiple major versions is selected in the Form Selector Window you can choose between the versions in the Versions dropdown. Check Support Later Minor Versions Automatically to bind the variable to all later minor versions (aka. v1.1, v1.2, v1.3 etc.) of the version you choose. Choose the form version by clicking Add version. The version is displayed in the Form Selector Window. |
Script
Script | |
---|---|
Script | Enter a script for the text generation. (User guide: https://composetogo.atlassian.net/wiki/spaces/CNGD/pages/1835176) |
Syntax highlight | Select the syntax highlight corresponding with the script. Your choices for syntax highlighting is Groovy, JSON, HTML, XML, Plain Text and YAML. |
Validate | The script may be validated, to search for errors in the script. Script validation will give you feedback on whether the script passed or failed. If the script fails an error message will help you find the error(s). These errors need to be corrected to version the text generator. |