Search in sources :

Example 1 with StackTerminationEvent

use of com.sequenceiq.cloudbreak.core.flow2.stack.termination.StackTerminationEvent in project cloudbreak by hortonworks.

the class StackTerminationFailureAction method createFlowContext.

@Override
protected StackFailureContext createFlowContext(String flowId, StateContext<StackTerminationState, StackTerminationEvent> stateContext, StackFailureEvent payload) {
    Flow flow = getFlow(flowId);
    StackView stackView = stackService.getByIdView(payload.getStackId());
    MDCBuilder.buildMdcContext(stackView);
    flow.setFlowFailed(payload.getException());
    return new StackFailureContext(flowId, stackView);
}
Also used : StackFailureContext(com.sequenceiq.cloudbreak.core.flow2.stack.StackFailureContext) StackView(com.sequenceiq.cloudbreak.domain.view.StackView) Flow(com.sequenceiq.cloudbreak.core.flow2.Flow)

Aggregations

Flow (com.sequenceiq.cloudbreak.core.flow2.Flow)1 StackFailureContext (com.sequenceiq.cloudbreak.core.flow2.stack.StackFailureContext)1 StackView (com.sequenceiq.cloudbreak.domain.view.StackView)1