Class ReversionWorkflowRequestErrorHandler
java.lang.Object
com.broadleafcommerce.sandbox.messaging.completion.error.ReversionWorkflowRequestErrorHandler
- All Implemented Interfaces:
WorkflowRequestErrorHandler
public class ReversionWorkflowRequestErrorHandler
extends Object
implements WorkflowRequestErrorHandler
- Author:
- Chad Harchar (charchar)
-
Constructor Summary
ConstructorsConstructorDescriptionReversionWorkflowRequestErrorHandler
(ChangeSummaryService<ChangeSummary> summaryService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandle
(@NonNull com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Determines if this handler can handle the givenWorkflowRequestCompletion
.protected ChangeSummaryService<ChangeSummary>
void
handle
(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion, String id) Responsible for any follow-up actions (like cleaning upChangeSummary
states/statuses) required after external microservices have met their responsibilities for a sandbox workflow transition triggered by aTransitionRequest
.
-
Constructor Details
-
ReversionWorkflowRequestErrorHandler
-
-
Method Details
-
canHandle
public boolean canHandle(@NonNull @NonNull @NonNull com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Description copied from interface:WorkflowRequestErrorHandler
Determines if this handler can handle the givenWorkflowRequestCompletion
. This is typically done by checking theWorkflowRequestCompletion.getRequestType()
.- Specified by:
canHandle
in interfaceWorkflowRequestErrorHandler
- Parameters:
completion
- aWorkflowRequestCompletion
received over theWorkflowRequestCompletionConsumer channel
or manually fromTransitionErrorEndpoint
- Returns:
- whether this handler can handle errors for the given
WorkflowRequestCompletion
-
handle
public void handle(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion, String id) Description copied from interface:WorkflowRequestErrorHandler
Responsible for any follow-up actions (like cleaning upChangeSummary
states/statuses) required after external microservices have met their responsibilities for a sandbox workflow transition triggered by aTransitionRequest
.- Specified by:
handle
in interfaceWorkflowRequestErrorHandler
- Parameters:
completion
- aWorkflowRequestCompletion
received over theWorkflowRequestCompletionConsumer channel
or manually fromTransitionErrorEndpoint
id
- the id of the top-most entity to handle the error, typically eitherChangeSummary
,ChangeSummaryGroup
, orChangeDeploy
, depending on theWorkflowRequestCompletion.getRequestType()
-
getSummaryService
-