Skip to content

Commit eed6ca3

Browse files
authored
Eliminated DestroyWorkflowThreadError ERROR when signal handler is blocked (#200)
1 parent 5d42c18 commit eed6ca3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/main/java/com/uber/cadence/internal/sync/POJOWorkflowImplementationFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ public void processSignal(String signalName, byte[] input, long eventId) {
297297
Throwable targetException = e.getTargetException();
298298
if (targetException instanceof DataConverterException) {
299299
logSerializationException(signalName, eventId, (DataConverterException) targetException);
300+
} else if (targetException instanceof Error) {
301+
throw (Error)targetException;
300302
} else {
301303
throw new Error(
302304
"Failure processing \"" + signalName + "\" at eventID " + eventId, targetException);

src/test/java/com/uber/cadence/workflow/WorkflowTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,7 @@ public void execute() {
12171217

12181218
@Override
12191219
public void signal(String value) {
1220+
Workflow.sleep(Duration.ofSeconds(1));
12201221
signal.complete(value);
12211222
}
12221223
}

0 commit comments

Comments
 (0)