use of com.uber.cadence.WorkflowExecutionSignaledEventAttributes in project cadence-client by uber-java.
the class TestWorkflowMutableStateImpl method addExecutionSignaledByExternalEvent.
private void addExecutionSignaledByExternalEvent(RequestContext ctx, SignalExternalWorkflowExecutionDecisionAttributes d) {
WorkflowExecutionSignaledEventAttributes a = new WorkflowExecutionSignaledEventAttributes().setInput(startRequest.getInput()).setInput(d.getInput()).setSignalName(d.getSignalName());
HistoryEvent executionSignaled = new HistoryEvent().setEventType(EventType.WorkflowExecutionSignaled).setWorkflowExecutionSignaledEventAttributes(a);
ctx.addEvent(executionSignaled);
}
use of com.uber.cadence.WorkflowExecutionSignaledEventAttributes in project cadence-client by uber-java.
the class TestWorkflowMutableStateImpl method addExecutionSignaledEvent.
private void addExecutionSignaledEvent(RequestContext ctx, SignalWorkflowExecutionRequest signalRequest) {
WorkflowExecutionSignaledEventAttributes a = new WorkflowExecutionSignaledEventAttributes().setInput(startRequest.getInput()).setIdentity(signalRequest.getIdentity()).setInput(signalRequest.getInput()).setSignalName(signalRequest.getSignalName());
HistoryEvent executionSignaled = new HistoryEvent().setEventType(EventType.WorkflowExecutionSignaled).setWorkflowExecutionSignaledEventAttributes(a);
ctx.addEvent(executionSignaled);
}
use of com.uber.cadence.WorkflowExecutionSignaledEventAttributes in project cadence-client by uber-java.
the class ReplayDecider method handleWorkflowExecutionSignaled.
private void handleWorkflowExecutionSignaled(HistoryEvent event) {
assert (event.getEventType() == EventType.WorkflowExecutionSignaled);
final WorkflowExecutionSignaledEventAttributes signalAttributes = event.getWorkflowExecutionSignaledEventAttributes();
if (completed) {
throw new IllegalStateException("Signal received after workflow is closed.");
}
this.workflow.handleSignal(signalAttributes.getSignalName(), signalAttributes.getInput(), event.getEventId());
}
Aggregations