Search in sources :

Example 1 with WorkflowExecutionCancelRequestedEventAttributes

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

the class StateMachines method requestWorkflowCancellation.

private static void requestWorkflowCancellation(RequestContext ctx, WorkflowData data, RequestCancelWorkflowExecutionRequest cancelRequest, long notUsed) {
    WorkflowExecutionCancelRequestedEventAttributes a = new WorkflowExecutionCancelRequestedEventAttributes().setIdentity(cancelRequest.getIdentity());
    HistoryEvent cancelRequested = new HistoryEvent().setEventType(EventType.WorkflowExecutionCancelRequested).setWorkflowExecutionCancelRequestedEventAttributes(a);
    ctx.addEvent(cancelRequested);
}
Also used : WorkflowExecutionCancelRequestedEventAttributes(com.uber.cadence.WorkflowExecutionCancelRequestedEventAttributes) HistoryEvent(com.uber.cadence.HistoryEvent)

Aggregations

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