public void failed ( String errorMessage , String errorDetails , int retries , long retryDuration ) { ensureActive ( ) ; this . setErrorMessage ( errorMessage ) ; if ( errorDetails != null ) { setErrorDetails ( errorDetails ) ; } this . lockExpirationTime = new Date ( ClockUtil . getCurrentTime ( ) . getTime ( ) + retryDuration ) ; setRetriesAndManageIncidents ( retries ) ; produceHistoricExternalTaskFailedEvent ( ) ; }
process failed state make sure that binary entity is created for the errorMessage shortError message does not exceed limit handle properly retry counts and incidents