You can use sdk client api to reset, for example:
ResetWorkflowExecutionResponse res =
service.blockingStub().resetWorkflowExecution(ResetWorkflowExecutionRequest.newBuilder()
.setNamespace("your namespace")
.setReason("your reason")
.setRequestId(UUID.randomUUID().toString())
.setResetReapplyType(ResetReapplyType.RESET_REAPPLY_TYPE_SIGNAL) // set to what you need
.setWorkflowTaskFinishEventId(3) // workflow task event id to reset to
.setWorkflowExecution(WorkflowExecution.newBuilder()
.setWorkflowId("your workflow id")
.setRunId("your runid") //optional
.build())
.build());
System.out.println("Reset exec run id: " + res.getRunId());
where “service” is your WorkflowServiceStubs