Skip to content

Child Workflows not Respecting WorkflowIdConflictPolicy.USE_EXISTING #1628

@blorgon1

Description

@blorgon1

Expected Behavior

When spawning a child workflow that has WorkflowIdConflictPolicy.USE_EXISTING and a workflow ID that is currently running, the running workflow's handle should be returned.

Actual Behavior

{
  "type": "workflowExecutionFailedEventAttributes",
  "failure": {
    "message": "Workflow execution already started",
    "source": "TypeScriptSDK",
    "stackTrace": "WorkflowExecutionAlreadyStartedError: Workflow execution already started ..."
  },
  ...
}

Steps to Reproduce the Problem

Using typescript-sdk:

import * as wf from '@temporalio/workflow';
  1. Workflow A runs and starts a child workflow using wf.startChild with workflow ID abc and workflowIdConflictPolicy: WorkflowIdConflictPolicy.USE_EXISTING
  2. Workflow A runs again and uses the same parameters on wf.startChild for workflow ID abc
  3. Observe WorkflowExecutionAlreadyStartedError

Specifications

  • Version:
    • Temporal server 1.26.2
    • @temporalio/* 1.11.5
  • Platform:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions