import { ChannelProvider } from "../core/ChannelProvider"; import type { IActivityHandler, IActivityContext } from "../../IActivityHandler"; /** Defines inputs for the RunWorkflow activity. */ export interface RunWorkflowInputs { url: string; arguments?: Record; } /** Defines outputs for the RunWorkflow activity. */ export interface RunWorkflowOutputs { /** @description The workflow's outputs. */ result: Record; } export declare class RunWorkflow implements IActivityHandler { static readonly action = "gcx:wf:core::RunWorkflow"; static readonly suite = "gcx:wf:builtin"; execute(inputs: RunWorkflowInputs, context: IActivityContext, ChannelProviderType: typeof ChannelProvider): Promise; private checkJobStatus; private delay; /** * Use a WebSocket to retrieve the result of the job from the server. * @param serverUrl The url of the instance of Workflow Server that is running the workflow. * @param ticket The JWT ticket associated with this job. * @param cancellationToken The cancellation token for the currently running workflow. * @returns A promise for the result of the workflow. Returns `null` if there is an error. */ private getResult; private getWebSocketUrl; private isServerWorkflow; /** * Repeatedly checks the job status until it is done. * @param serverUrl The url of the instance of Workflow Server that is running the workflow. * @param ticket The JWT ticket associated with the job. * @param delay The time to wait in milliseconds before the next check. * @param channel The ChannelProvider to use for communication with the server. * @param cancellationToken The cancellation token for the currently running workflow. * @returns A promise for the result of the workflow. Throws an error in some cases. */ private pollResult; private runClientWorkflow; private runServerWorkflow; }