Question#
Display a message to inform the user that some information is required, allowing him to provide an answer.
| Name | Description | Mandatory | Type | Possible Values | Default Value |
|---|---|---|---|---|---|
| message | Message to show to the user | Y | String | ||
| dataType | Value type expected for the user to answer with | Y | Enum | StringIntegerLongDecimalBooleanDateTimeObjectPasswordEntityTypeFindEntityEnum | String |
| defaultValue | Default value to provide to the user | N | any | ||
| settings | Sub settings to customize the input box displayed to the user | N | Object | {} |
Multi-language messages
message can also be an object mapping language codes to strings (for example, {"en": "Hello", "pt": "Olá"}), instead of a plain string. It is resolved to the text matching the user's current language, falling back to the configured default language if there is no exact match.
DataType specific settings#
| DataType | Property | Description | Mandatory | Type | Possible Values | Default Value |
|---|---|---|---|---|---|---|
EntityType | data | Script to execute to return the array of Entity types to display Note: Either this or query must be provided | N | Script | ||
| query | Script that will return a QueryObject. Note: Either this or data must be provided | N | Script | |||
| displayField | Property of the object to show in the selector (in the GUI it will use the dataComparisonField property) | N | String | "Name" | ||
FindEntity | data | Script to execute to return the array of entities to display Note: Either this or query must be provided | N | Script | ||
| query | Script that will return a QueryObject. Note: Either this or data must be provided | N | Script | |||
| referenceTypeName | Name of the entity type used as reference for the search | N | String | |||
Enum | enumValues | Values to show. Either a list of string where each string is an option or an object, where the key is the text to show and the value if the value of the selection | N | String[]Object | ||
| data | Script that must return an array of objects that will be used by the gui and must respect have the properties Id and Name | N | Script |
Example snippets#
{
"name": "Example Question",
"type": "Question",
"settings": {
"message": "What is your name?",
"dataType": "String"
},
"next": "End",
"resultKey": "name"
}
{
"name": "Example Question Integer Min Max",
"type": "Question",
"settings": {
"message": "What is your age",
"dataType": "Integer",
"defaultValue": 20,
"settings": {
"min": 0,
"max": 120
}
},
"next": "End",
"resultKey": "age"
}
{
"name": "Example Question Enum",
"type": "Question",
"resultKey": "selectionMode",
"settings": {
"message": "Do you wish to have a manual selection with ',' separated Manager Names or the interactive mode?",
"dataType": "Enum",
"settings": {
"enumValues": [
"Manual",
"Interactive"
]
},
"defaultValue": "Interactive"
},
"next": "End"
}