Overview of how to build App configuration
App most usually requires some sort of configuration specific to its installation.
Below you can find the Ergonode CSV App configuration.
Such configuration can be achieved by setting up the configuration_schema section in the Manifest file.
The value is a list of JSON Schemas allowing you to build a form.
Not full JSON Schema is yet covered in Ergonode.
If you have a case of a feature that suits your needs and is a part of the JSON Schema standard we may consider extending our implementation.
Please contact the respective Ergonode representative with the details.
The reason it's a list is fairly simple - in some scenarios, at first you need to input i.e. API Token, then choose which attributes from the App you'd want to configure - a piece of information that is only accessible once authorized within the system App is handling.
So the following steps in the form(following JSON Schemas) will be built once you correctly fill the current step.
Ok, so a lot is going on in this example. Let's break it down field by field.
This is the simplest case.
It's a plain text that your user can input. It'll be displayed as a regular HTML text input.
The secret is very similar to the previous simple text example but as with any other sensitive data you do not always want it visible constantly on your configuration. That's why a password widget is added - it results in a hidden secret text.
Sometimes one-line text won't suffice. You can extend the text presentation thanks to the textarea widget.
Another frequent case is a limited of values from which a user can choose. That's where the enum comes into play. There are 2 additional special fields added here
enum - represents the actual valid value list to choose from
options.enum_titles - represents the presentational titles list to be displayed to the user in dropdown
An extended example of simple enums is when you have multiple choice allowed. Instead of using type string
adjust it to array
with string
type elements.
Here's where things get a bit more kinky. You, again, need a predefined set of values but those values are already there in Ergonode i.e. a list of languages to choose from or an attribute.
A field options.enum_dictionary
is added - in short, you tell the interpreter to render a list of languages from Ergonode via a dictionary ergonode:languages
- this is resolved by Ergonode.
Ergonode dictionaries reference can be found here.
Another possibility is that the predefined list is not part of Ergonode data but the App or system it integrates with. The App may define multiple dictionaries with different data.
App dictionaries reference can be found here.
Note this time options.enum_dictionary
is wrapped into items
- this changes the select to multi-select in the dropdown list.
Occasionally, especially on synchronization Apps, you'll need attributes mapping from Ergonode to an external system. This is possible by combining two things.
A structure definition that can carry on the mapping
and mapper widget capable of making it easier to map the data in the configuration user interface.
Widgets are dedicated UI components that allow a custom presentation of a specific field.
Changes displaying of the plain text in HTML text input into password input.
Presents text input in the form of textarea input.
Allows for drag-and-drop mapping of the attributes and handles validation of their types.
The widget accepts 2 options:
ergonodeDictionary - saying where from claim data - this option is mandatory
appDictionary - this field is optional - if not present the Ergonode mapping will be possible to textual values