| 1 | [ |
| 2 | "autonomous agent", |
| 3 | { |
| 4 | "init": "{ |
| 5 | |
| 6 | $nom_AA = 'Obte_Dades_Node'; |
| 7 | $versio = '1.0'; |
| 8 | |
| 9 | $AA_PF = trigger.data.AA_PF; |
| 10 | $adr = trigger.data.adr; |
| 11 | |
| 12 | $_AA_Activacions = var[ $AA_PF ][ '_AA_Activacions' ]; |
| 13 | $activacio = var[ $_AA_Activacions ][ 'activacio_' || $adr ]; |
| 14 | |
| 15 | $_AA_Subscripcions = var[ $AA_PF ][ '_AA_Subscripcions' ]; |
| 16 | $subscripcio = var[ $_AA_Subscripcions ][ 'subscripcio_' || $adr ]; |
| 17 | |
| 18 | $_AA_Renovacions = var[ $AA_PF ][ '_AA_Renovacions' ]; |
| 19 | $cicle_renovacio = var[ $_AA_Renovacions ][ 'cicle_' || $adr ]; |
| 20 | |
| 21 | $_AA_Compensacions = var[ $AA_PF ][ '_AA_Compensacions' ]; |
| 22 | $total_Derivacions = var[ 'total_Derivacions_de_' || $adr ]; |
| 23 | |
| 24 | $_AA_Avisos = var[ $AA_PF ][ '_AA_Avisos' ]; |
| 25 | $avis = var[ 'Avis_' || $adr ]; |
| 26 | |
| 27 | }", |
| 28 | "messages": [ |
| 29 | { |
| 30 | "app": "state", |
| 31 | "state": "{ |
| 32 | response[ 'Nom Activació' ] = $activacio.nom; |
| 33 | response[ 'Escala Activació' ] = $activacio.escala; |
| 34 | response[ 'Nom Subscripció' ] = $subscripcio.nom; |
| 35 | response[ '% Derivació a FOP' ] = $subscripcio.aFOP; |
| 36 | response[ 'Cicle Subscripció' ] = $subscripcio.cicle; |
| 37 | response[ 'Cicle Renovació' ] = $cicle_renovacio; |
| 38 | response[ 'Total Derivacions a FOP' ] = $total_Derivacions; |
| 39 | if ( !! $avis.estat ) { response[ 'Avís' ] = $avis.text; } |
| 40 | }" |
| 41 | } |
| 42 | ] |
| 43 | } |
| 44 | ] |