Condition
A condition is a tree-shaped expression that is evaluated against a set of Harmoney data points. It is used in many parts of the configuration, for example in Validations, Actions, Providers, Flow Definitions and Form Definitions.
Every node of a condition tree must contain exactly one of the properties listed below: either a logical operator (not, and, or) that nests further conditions, or a comparison that targets a data point through a fieldPath.
Logical operatorsβ
Logical operators do not have a fieldPath of their own. They combine other conditions.
not: a single nested condition that must evaluate tofalse.and: a list of nested conditions; all of them must evaluate totrue.or: a list of nested conditions; at least one of them must evaluate totrue.
{
"and": [
{ "equals": { "fieldPath": "type", "value": "KNOW_YOUR_CUSTOMER" } },
{ "not": { "equals": { "fieldPath": "status", "value": "CLOSED" } } },
{ "or": [
{ "equals": { "fieldPath": "metadata.HIGH_RISK", "value": true } },
{ "equals": { "fieldPath": "metadata.PEP", "value": true } }
]}
]
}
Comparison conditionsβ
All comparisons take a fieldPath that points to a data point. The available field paths depend on the context in which the condition is used (see Field path below).
Equalityβ
equals/notEquals: the data point must (not) be equal tovalue. The type ofvaluemust match the data point (string, number, boolean, ...).
{ "equals": { "fieldPath": "client.partyType", "value": "COMPANY" } }
String matchingβ
like/notLike: the data point (string) must (not) match the regex invalue. The character%is interpreted as.*.
{ "like": { "fieldPath": "name", "value": "ACME%" } }
Membershipβ
in/notIn: the data point must (not) be equal to one of the strings invalues.
{ "in": { "fieldPath": "type", "values": ["BYLAWS", "ID_CARD"] } }
isInList/isNotInList: checks the data point against a list defined on the organization.listIdentifierselects the list.listFilterValueis optional:- With
listFilterValue: the list is treated as a keyβvalue map. The condition matches when the entry keyed by the data point carries a value equal tolistFilterValue. - Without
listFilterValue(blank or omitted): a pure membership check.isInListmatches when the data point exists as an entry (identifier) in the list, regardless of any value stored against it;isNotInListmatches when it does not. Use this for plain membership lists that have no per-entry values.
- With
{
"isInList": {
"fieldPath": "client.country",
"listIdentifier": "HIGH_RISK_COUNTRIES",
"listFilterValue": "HIGH"
}
}
{
"isNotInList": {
"fieldPath": "party.individual.nationality",
"listIdentifier": "OPENLANE_EE_EU_COUNTRIES"
}
}
Collectionsβ
contains/notContains: the data point must be a collection that does (not) containvalue.
{ "contains": { "fieldPath": "documents[*].type", "value": "PASSPORT" } }
Numeric comparisonβ
greaterThan: data point must be greater thanvalue. Numbers only.smallerThan: data point must be strictly smaller thanvalue. Numbers only.
{ "greaterThan": { "fieldPath": "ubo.percentage", "value": 25 } }
Null / emptyβ
isNull: the data point must benull. For collections, it must be empty.isNotNull: the data point must not benull. For collections, it must be non-empty.
{ "isNotNull": { "fieldPath": "client.documents[?(@.type == 'BYLAWS')]" } }
Field pathβ
A fieldPath selects a data point by name, using dot notation to descend into nested objects (for example client.individual.maritalStatus). For collection-valued data points, JSON-path style filters and wildcards are supported, for example dossier.client.documents[*].assessment.assessment or documents[?(@.type == 'BYLAWS')].
:::warning Always guard collection paths with isNotNull
When using JSON-path wildcards ([*]) on a collection β for example dossier.client.documents[*].assessment.assessment β always wrap the expression in an and condition whose first clause is an isNotNull check on the parent collection (e.g. dossier.client.additionalTaxInformation).
Without this guard, if the parent collection is null or empty, every operator (in, contains, equals, β¦) that traverses it will evaluate to true instead of false, producing incorrect results.
{
"and": [
{
"isNotNull": {
"fieldPath": "dossier.client.additionalTaxInformation"
}
},
{
"in": {
"fieldPath": "dossier.client.additionalTaxInformation[*].countryCode",
"values": ["IN", "US"]
}
}
]
}
:::
Which paths are valid depends on the data point source bound to the condition by the consuming configuration. Each consumer of the condition decides which source applies. Sources currently in use:
PartyDataPoint(alsoPartyExternalDataPoint)IdentityDataPointDossierDataPoint(alsoDossierExternalDataPoint)DocumentDataPointRbaDataPointUboDataPointRelatedPartyDataPointSignatoryDataPointDueDiligenceSubjectDataPointDueDiligenceProviderInput
The Harmoney UI offers field path autocomplete based on the source of the surrounding configuration, so a condition embedded in a dossier-scoped setting will only show dossier paths, etc.
Examplesβ
{
"and": [
{ "equals": { "fieldPath": "type", "value": "KNOW_YOUR_CUSTOMER" } },
{ "equals": { "fieldPath": "metadata.HIGH_RISK", "value": true } },
{ "notEquals": { "fieldPath": "status", "value": "CLOSED" } }
]
}
{
"and": [
{ "equals": { "fieldPath": "client.partyType", "value": "COMPANY" } },
{ "isNotNull": { "fieldPath": "dossier.documents[?(@.type == 'BYLAWS')]" } }
]
}
{
"and": [
{ "greaterThan": { "fieldPath": "percentage", "value": 25 } },
{ "isInList": {
"fieldPath": "party.individual.nationality",
"listIdentifier": "SANCTIONED_COUNTRIES",
"listFilterValue": "code"
}}
]
}