@ Override public Object execute ( String correlationId , Parameters args ) throws ApplicationException { if ( _schema != null ) _schema . validateAndThrowException ( correlationId , args ) ; try { return _function . execute ( correlationId , args ) ; } catch ( Throwable ex ) { throw new InvocationException ( correlationId , "EXEC_FAILED" , "Execution " + _name + " failed: " + ex ) . withDetails ( "command" , _name ) . wrap ( ex ) ; } }
Executes the command . Before execution is validates Parameters args using the defined schema . The command execution intercepts ApplicationException raised by the called function and throws them .