Evaluators
Evaluators are used to define conditions that determine whether a block of configuration should be included in the evaluated and merged configuration document.
Evaluators work on different aspects of the runtime experience, including:
- what is being observed
- who is observing it
- what URL is being looked at
- what objects are known about at the time (i.e. observables)
- what permissions and authorities the current user has over things that are being observed
There are many types of evaluators available.
The condition parameter
Each conditional block names an evaluator and may supply a condition. In the evaluate phase of the Configuration Service, the evaluator matches the current runtime state against the given condition. If true, the block's config section is carried forward and merged into the final configuration document.
{
"evaluator": "{evaluatorId}",
"condition": {condition},
"config": {
...
}
}
Each evaluator has its own support for different kinds of conditions, so set the condition according to what the evaluator expects (if it is needed at all). For example:
document-has-typetakes a type as its condition (for example,"my:article")document-is-filetakes no conditionandandortake an array of condition blocksnottakes a single condition block
A condition is only applicable when an evaluator is supplied. If an evaluator is not supplied, the configuration block always evaluates to true.
Boolean evaluators assume a condition of true, which tests for the evaluator to return true. You can adjust this to test the opposite by setting condition to false.
Available evaluators
The following evaluators are available:
- and
- context-application
- context-archive
- context-conflict
- context-datalist
- context-dataview
- context-definition
- context-deployment
- context-document
- context-document-has-feature
- context-document-has-property-value
- context-document-has-qname
- context-document-has-type
- context-document-is-association
- context-document-is-container
- context-document-is-datalist
- context-document-is-multilingual
- context-document-is-node
- context-document-is-tag
- context-form
- context-group
- context-platform
- context-principal
- context-project
- context-project-application
- context-release
- context-role
- context-team
- context-user
- context-vault
- context-workflow
- context-workflow-model
- context-workflow-task
- current-user-has-authority
- current-user-has-permission
- document-has-attachment
- document-has-qname
- document-has-type
- document-is-file
- document-is-folder
- document-is-locked
- document-is-locked-by-current-user
- entity-is-type
- entity-property-equals
- id
- not
- or
- project-has-application
- project-has-module
- project-workspaces-enabled
- tenant-has-plan
- uri-match
- uri-starts-with