uber / cadence-java-client

Java framework for Cadence Workflow Service
https://cadenceworkflow.io
Other
143 stars 106 forks source link

ActivityCompletionClientImpl#completeExceptionally does not work #639

Open arabczuk-equinix opened 3 years ago

arabczuk-equinix commented 3 years ago

The ActivityCompletionClient method does not work

com.uber.cadence.internal.sync.ActivityCompletionClientImpl#complete(com.uber.cadence.WorkflowExecution execution, java.lang.String activityId, R result) invocation of the method always results in exception

Caused by: com.uber.cadence.client.ActivityCompletionFailureException: ActivityIdXX
Caused by: com.uber.cadence.BadRequestError: ActivityID is not set on request.

Root cause

The activityId is not set in the code when sending request to Cadence. https://github.com/uber/cadence-java-client/blob/38667f13302eaa1bd4257d6dae476405ec1e9037/src/main/java/com/uber/cadence/internal/external/ManualActivityCompletionClientImpl.java#L134

      RespondActivityTaskFailedByIDRequest request = new RespondActivityTaskFailedByIDRequest();
      request.setReason(failure.getClass().getName());
      request.setDetails(dataConverter.toData(failure));
      request.setDomain(domain);
      request.setWorkflowID(execution.getWorkflowId());
      request.setRunID(execution.getRunId());
arabczuk-equinix commented 3 years ago

any updates? this is quite critical