use of com.uber.cadence.QueryWorkflowRequest in project cadence-client by uber-java.
the class GenericWorkflowClientExternalImpl method queryWorkflow.
@Override
public byte[] queryWorkflow(QueryWorkflowParameters queryParameters) {
QueryWorkflowRequest request = new QueryWorkflowRequest();
request.setDomain(domain);
WorkflowExecution execution = new WorkflowExecution();
execution.setWorkflowId(queryParameters.getWorkflowId()).setRunId(queryParameters.getRunId());
request.setExecution(execution);
WorkflowQuery query = new WorkflowQuery();
query.setQueryArgs(queryParameters.getInput());
query.setQueryType(queryParameters.getQueryType());
request.setQuery(query);
try {
QueryWorkflowResponse response = service.QueryWorkflow(request);
return response.getQueryResult();
} catch (TException e) {
throw CheckedExceptionWrapper.wrap(e);
}
}
Aggregations