Conditional Branching
How to route a transition to two different end states using endStateCondition and the IS_RESUBMITTED pattern.
Some transitions have two possible destination states depending on a runtime condition. The system routes to endStateTwo if the condition matches, otherwise to endStateOne.
{
"endStateOne": { "...default path..." },
"endStateTwo": { "...alternate path when condition is true..." },
"endStateCondition": {
"endStateTwo": [
{ "parameter": "FIELD_KEY", "value": "true", "comparator": "EQ" }
]
}
}Comparators: EQ, NEQ, GT, LT, GTE, LTE, CONTAINS
IS_RESUBMITTED pattern
IS_RESUBMITTED is a boolean form field on the application form. It is set to true when the applicant resubmits after a partner RFA. Integration chains use it to route resubmitted applications through a modified path:
"endStateCondition": {
"endStateTwo": [
{ "parameter": "IS_RESUBMITTED", "value": "true", "comparator": "EQ" }
]
}endStateOne: normal first-submission path — runs theINTEGRATIONinbreakingActionendStateTwo: resubmission path — may skip the integration (breakingAction: null) and jump ahead withnextEvent: "PUSH"or route to a different state
Rule: Only add endStateCondition when the user/spec explicitly requires it. Do not add speculatively.