Search in sources :

Example 1 with DecisionTaskFailedEventAttributes

use of com.uber.cadence.DecisionTaskFailedEventAttributes in project cadence-client by uber-java.

the class StateMachines method failDecisionTask.

private static void failDecisionTask(RequestContext ctx, DecisionTaskData data, RespondDecisionTaskFailedRequest request, long notUsed) {
    DecisionTaskFailedEventAttributes a = new DecisionTaskFailedEventAttributes().setIdentity(request.getIdentity()).setCause(request.getCause()).setDetails(request.getDetails()).setStartedEventId(data.previousStartedEventId).setScheduledEventId(data.scheduledEventId);
    HistoryEvent event = new HistoryEvent().setEventType(EventType.DecisionTaskFailed).setDecisionTaskFailedEventAttributes(a);
    ctx.addEvent(event);
}
Also used : DecisionTaskFailedEventAttributes(com.uber.cadence.DecisionTaskFailedEventAttributes) HistoryEvent(com.uber.cadence.HistoryEvent)

Aggregations

DecisionTaskFailedEventAttributes (com.uber.cadence.DecisionTaskFailedEventAttributes)1 HistoryEvent (com.uber.cadence.HistoryEvent)1