[
"autonomous agent",
{
"init": "{
$projecte = 'Isònia ·00·';
$__dada = $refval =>
data_feed [[
oracles = this_address,
feed_name = $refval,
ifnone = false
]];
$args = trigger.data;
$adr = trigger.address;
if ( !! $__dada( 'Origen' ) ) {
$agents_admesos = (
$__dada( '_Portal_Original' ) || ', ' ||
$__dada( '_Portal' ) || ', ' ||
$__dada( '_Calaix' ) || ', ' ||
$__dada( '_Accions' ) || ', ' ||
$__dada( '_Getons' ) || ', ' ||
$__dada( '_Implementacions' ) || ', ' ||
$__dada( '_Pronunciaments' ) || ', ' ||
$__dada( '_Convocatories' ) || ', ' ||
$__dada( '_Vinculacions' ) || ', ' ||
$__dada( '_Avisos' ) || ', ' ||
$__dada( $args.geto || '__Capsa' )
);
if ( ! contains( $agents_admesos, $adr )) {
$excepcio_provisional =
trigger.initial_address == $__dada( '_AUT_000' )
AND ! $__dada( '_AUT_0' );
if ( ! $excepcio_provisional )
bounce(
" L'adreça " || $adr ||
" no pertany a un agent reconegut." ||
" Adreces d'agents regoneguts: " ||
$agents_admesos );
}
}
}",
"messages": [
{
"app": "data_feed",
"payload": "{ $args.dades }"
},
{
"app": "state",
"state": "{
if ( $excepcio_provisional )
response[ 'Registre directe per AUT_000' ] =
'Adreça Agent ' || $adr;
response[ 'Registrades' ] = $projecte;
}"
}
]
}
]