You are here:
StateRuleService:getTransitionStates
Use this service to get default transition states, the To state of each from state transition, the current state, and the last default state for the target object.
Method: getTransitionStates
How It Works
-
The service retrieves the object specified by the objectId option.
-
The service retrieves the object specified by the objectId option.
-
The current state is retrieved from the object.
-
If the object has log entries, the latest log entry is retrieved and the lastDefaultState value is returned as well as any associated failure messages.
If the object has no log entries, the lastDefaultState is returned as null and an empty list is returned for the failure messages.
Output JSON
{
"defaultTransitionStates": ["Draft", "Submitted", "Approved", "Underwriting"],
"eachStateToStates": {
"Underwriting": ["Approved"],
"Submitted": ["Approved", "Decline", "Underwriting"],
"Draft": ["Submitted"],
"Approved": ["Issued"]
},
"currentState": "Submitted",
"lastDefaultState": "Draft",
"failureMessages": [{
"name": "Rule 1",
"message": "Failure Message"
}, {
"name": "Rule 2",
"message": "Failure Message"
}]
}
