Package org.tkit.rhpam.quarkus.messaging
Class BusinessErrorHandlerStepService
- java.lang.Object
-
- org.tkit.rhpam.quarkus.messaging.BusinessErrorHandlerStepService
-
- All Implemented Interfaces:
ProcessStepService
@ApplicationScoped @Traced public class BusinessErrorHandlerStepService extends Object implements ProcessStepService
-
-
Constructor Summary
Constructors Constructor Description BusinessErrorHandlerStepService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessStepExecutionResultdoExecute(ProcessStepExecution workItem)Execute the process work item.AdditionalErrorInfoprovideErrorInformation(ProcessStepExecution workItem, Exception exc)Provide any additional error information in case the processing of#doExecutehas failed.
-
-
-
Method Detail
-
doExecute
public ProcessStepExecutionResult doExecute(ProcessStepExecution workItem) throws RhpamException
Description copied from interface:ProcessStepServiceExecute the process work item. If this method results in an exception, it is treated as Technical error in Tkit error handling. In case of exception, the tkit-rhpam will invokeProcessStepService.provideErrorInformation(ProcessStepExecution, Exception)method, where you can provide error code, message and deeplink for better error analysis. If not provided and exception is of typeRhpamExceptionthen its getErrorCode() is used as failed step error code.When you want to indicate a negative outcome which should be handled by the Business Error Handler WIH later in the process, specify these 3 variables in output:
Constants.FAILED_STEP_ERROR_CODE- for error code,Constants.FAILED_STEP_ERROR_MSG- for error message text,Constants.FAILED_STEP_DEEP_LINK- for backlink to the failed object, e.g. link to Object detail in our UI view,- Specified by:
doExecutein interfaceProcessStepService- Parameters:
workItem- the process work item.- Returns:
- the result parameters for the workflow.
- Throws:
RhpamException- if the method fails.
-
provideErrorInformation
public AdditionalErrorInfo provideErrorInformation(ProcessStepExecution workItem, Exception exc)
Description copied from interface:ProcessStepServiceProvide any additional error information in case the processing of#doExecutehas failed. In case you dont want to provide any additional info, return null.- Specified by:
provideErrorInformationin interfaceProcessStepService- Parameters:
workItem- workitem that failedexc- exception that occurred- Returns:
- instance of
AdditionalErrorInfo, most important attributes areerrorCodeanddeepLink- for back navigation from support tool.
-
-