• Spawns a child workflow in fire-and-forget mode. The parent workflow continues immediately without waiting for the child to complete. Returns the child's job ID for later reference (e.g., to interrupt or query the child).

    This is a convenience wrapper around execChild with await: false.

    import { Durable } from '@hotmeshio/hotmesh';

    export async function dispatchWorkflow(taskId: string): Promise<string> {
    // Fire-and-forget: start the child and continue immediately
    const childJobId = await Durable.workflow.startChild({
    taskQueue: 'background',
    workflowName: 'longRunningTask',
    args: [taskId],
    });

    // Optionally store the child ID for monitoring
    const search = await Durable.workflow.search();
    await search.set({ childJobId });

    return childJobId;
    }

    Parameters

    Returns Promise<string>

    The child workflow's job ID.