Attribute Sets
The attribute sets are libraries of reusable attributes. In the templates section of the administration, click the Attribute sets tab to manage the set of attributes. The attributes defined here can then be used in different templates.
To add a new set, you have to click on the Add attribute set button, and then it is sufficient to specify a unique name. Moreover, you can select an existing set to see all the associated attribute definitions.
On the right side of the Properties panel you can define a new attribute by filling the Attribute name and clicking on Save, the new attribute will appear in the Attributes list. You can reorder the position of the elements in the list, and of course you can select whatever attribute and modify its definition at any time.
Presets
For the attributes of type String, you can also define the Input Mode preset that will display to the end user a list of possible options to choose. The options can be managed by clicking on Attribute options.
You can also Import and Export huge lists of options in CSV format.
Initialization
For each attribute, you may write your initialization script that will be used to initialize the initial value of the attributes.
If you click in the cog icon of the Initialization field, a wizard will help you in generating the most common initialization scripts for that attribute type. In your script, you do your elaborations and update the variable $attribute accordingly.
Dictionary available for the Automation in this context
AUTOMATION CONTEXT: INITIALIZATION | ||
---|---|---|
Variable | Java Class | Description |
object | ExtensibleObject | the object under initialization, for instance a Document or a Folder |
event | History | the current event |
attributeName | name of the current attribute being initialized | |
attribute | Attribute | the current attribute being initialized |
Read the Automation manual for more information.
Validation
For each attribute, you may write your validation script that will be used to validate the input of the user. In your script you do your checks and in case of invalid value, put the reason of the error in the variable $error.
If you click in the cog icon of the Validation field, a wizard will help you in generating the most common validator scripts for that attribute type.
Dictionary available for the Automation in this context
AUTOMATION CONTEXT: VALIDATION | ||
---|---|---|
Variable | Java Class | Description |
object | ExtensibleObject | the object under validation, for instance a Document or a Folder |
event | History | the current event |
errors | map of strings. Key is the attribute name, Value is the error description | |
attributeName | name of the current attribute being validated (only available in attribute validator) | |
attribute | Attribute | the current attribute being validated (only available in attribute validator) |
value | value of the current attribute being validated (only available in attribute validator) | |
error | ValidationError | keeps the error description of the current attribute being validated (only available in attribute validator) |
Read the Automation manual for more information.