MCPcopy Create free account
hub / github.com/ShipSecAI/studio / queryWorkflow

Method queryWorkflow

backend/src/temporal/temporal.service.ts:216–224  ·  view source on GitHub ↗

* Query a running workflow for state

(input: {
    workflowId: string;
    queryType: string;
    args?: unknown[];
  })

Source from the content-addressed store, hash-verified

214 * Query a running workflow for state
215 */
216 async queryWorkflow<T = unknown>(input: {
217 workflowId: string;
218 queryType: string;
219 args?: unknown[];
220 }): Promise<T> {
221 const handle = await this.getWorkflowHandle({ workflowId: input.workflowId });
222 this.logger.debug(`Querying workflow ${input.workflowId} with query '${input.queryType}'`);
223 return handle.query(input.queryType, ...(input.args ?? []));
224 }
225
226 private async getWorkflowHandle(ref: WorkflowRunReference): Promise<WorkflowHandle<any>> {
227 const client = await this.getClient();

Callers 1

pollForToolCallResultMethod · 0.80

Calls 3

getWorkflowHandleMethod · 0.95
debugMethod · 0.80
queryMethod · 0.80

Tested by

no test coverage detected