use of com.uber.cadence.DecisionTaskCompletedEventAttributes in project cadence-client by uber-java.
the class StateMachines method completeDecisionTask.
private static void completeDecisionTask(RequestContext ctx, DecisionTaskData data, RespondDecisionTaskCompletedRequest request, long notUsed) {
DecisionTaskCompletedEventAttributes a = new DecisionTaskCompletedEventAttributes().setIdentity(request.getIdentity()).setScheduledEventId(data.scheduledEventId);
HistoryEvent event = new HistoryEvent().setEventType(EventType.DecisionTaskCompleted).setDecisionTaskCompletedEventAttributes(a);
ctx.addEvent(event);
ctx.onCommit((historySize) -> data.attempt = 0);
}
Aggregations