143 lines
2.8 KiB
JSON
143 lines
2.8 KiB
JSON
{
|
|
"schemaVersion": 1,
|
|
"flowKey": "SCORING_DEMO",
|
|
"version": 1,
|
|
"initialState": "BURO_PENDIENTE",
|
|
"dataSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"clienteId": {
|
|
"type": "string"
|
|
},
|
|
"consentimientoId": {
|
|
"type": "string"
|
|
},
|
|
"validaciones": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"clienteId",
|
|
"consentimientoId"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"states": [
|
|
{
|
|
"key": "BURO_PENDIENTE",
|
|
"terminal": false
|
|
},
|
|
{
|
|
"key": "PASO_N",
|
|
"terminal": true
|
|
},
|
|
{
|
|
"key": "PASO_M",
|
|
"terminal": true
|
|
},
|
|
{
|
|
"key": "REVISION_MANUAL",
|
|
"terminal": true
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"key": "VALIDAR_BURO",
|
|
"inputSchema": {
|
|
"type": "numeric"
|
|
}
|
|
}
|
|
],
|
|
"transitions": [
|
|
{
|
|
"id": "consultar-buro",
|
|
"from": "BURO_PENDIENTE",
|
|
"event": "VALIDAR_BURO",
|
|
"allowedRoles": [
|
|
"ANALISTA"
|
|
],
|
|
"actions": [
|
|
{
|
|
"id": "buro",
|
|
"type": "INVOKE_INTEGRATION",
|
|
"integrationKey": "BURO_CONSULTA",
|
|
"contractVersion": "1",
|
|
"inputs": {
|
|
"clienteId": {
|
|
"path": "/request/data/clienteId"
|
|
},
|
|
"consentimientoId": {
|
|
"path": "/request/data/consentimientoId"
|
|
}
|
|
},
|
|
"resultKey": "buro"
|
|
}
|
|
],
|
|
"decision": "RUTA_SCORING",
|
|
"destinations": {
|
|
"N": "PASO_N",
|
|
"M": "PASO_M",
|
|
"MANUAL": "REVISION_MANUAL"
|
|
},
|
|
"updates": [
|
|
{
|
|
"target": "/validaciones/buro",
|
|
"value": {
|
|
"path": "/results/buro"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"decisions": [
|
|
{
|
|
"id": "RUTA_SCORING",
|
|
"hitPolicy": "UNIQUE",
|
|
"rules": [
|
|
{
|
|
"id": "alto",
|
|
"when": {
|
|
"op": "GT",
|
|
"left": {
|
|
"path": "/results/buro/score"
|
|
},
|
|
"right": {
|
|
"literal": 70
|
|
}
|
|
},
|
|
"output": "N"
|
|
},
|
|
{
|
|
"id": "medio",
|
|
"when": {
|
|
"op": "AND",
|
|
"args": [
|
|
{
|
|
"op": "GT",
|
|
"left": {
|
|
"path": "/results/buro/score"
|
|
},
|
|
"right": {
|
|
"literal": 60
|
|
}
|
|
},
|
|
{
|
|
"op": "LTE",
|
|
"left": {
|
|
"path": "/results/buro/score"
|
|
},
|
|
"right": {
|
|
"literal": 70
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"output": "M"
|
|
}
|
|
],
|
|
"defaultOutput": "MANUAL"
|
|
}
|
|
],
|
|
"tasks": []
|
|
}
|