Condition
Represents a condition in a processing item.
Elements of a condition object literal
Element |
Type |
Description |
id |
String |
UUID of the condition |
statementType |
String |
Type of condition—one of: NO_TYPE , IF_TYPE , ELSEIF_TYPE , ELSE_TYPE , ALWAYS_TYPE |
expression |
Expression object |
Only present if statementType is IF_TYPE or ELSEIF_TYPE ; expression to evaluate |
processingItems |
Array of processing items |
Processing items to perform if the condition is true |
expressionId |
String |
UUID of the expression to evaluate for IF_TYPE and ELSEIF_TYPE conditions; otherwise, empty |
Condition example
{
"id": "e77de595-920e-4d52-8b30-c02ddffc6acc",
"statementType": "IF_TYPE",
"expression": {
"id": "1c052b41-7c4a-4302-9103-0e6c64d2e181",
"leftVariable": {
"id": "7b99d7f5-96d5-43b8-8d55-584bdc6b93de",
"name": "coffeeTypesSpecial",
// ...
"simpleVariableType": "DYNAMIC_ENTITY_DATA",
"timestamp": "2020-07-23T00:05:04.622Z"
},
"relationalOperator": "NOT_EQUAL_OPERATOR",
"lastModified": "2020-07-23T00:05:04.674Z",
"rightSpecialOperand": "NULL",
"leftVariableId": "7b99d7f5-96d5-43b8-8d55-584bdc6b93de"
},
"processingItems": [{
"action": {
"assign": {
"lhsVariable": {
"id": "d01be426-5e80-4b2b-8deb-cda3acc83159",
"name": "gotSpecial",
"description": "Look up special coffee types (once per session)",
"possibleValues": ["true", "false"],
// ...
"simpleVariableType": "BOOLEAN_TYPE",
"timestamp": "2020-07-23T00:05:04.603Z"
},
"constant": "true",
"lhsVariableId": "d01be426-5e80-4b2b-8deb-cda3acc83159"
}
},
"id": "c49b2c3e-32b2-4c50-b8d9-8d693673ac24",
"note": ""
}
],
"expressionId": "1c052b41-7c4a-4302-9103-0e6c64d2e181"
}