Skip to content

feat: allow UseExisting conflicts policy#763

Open
xepozz wants to merge 2 commits into
masterfrom
feature/on-conflict-options
Open

feat: allow UseExisting conflicts policy#763
xepozz wants to merge 2 commits into
masterfrom
feature/on-conflict-options

Conversation

@xepozz

@xepozz xepozz commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

What was changed

Why?

Allows re-use duplicated flows if necessary

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@xepozz xepozz requested review from a team, roxblnfk and wolfy-j as code owners June 9, 2026 07:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3176fedab5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +311 to +312
if ($request->getWorkflowIdConflictPolicy() === WorkflowIdConflictPolicy::UseExisting->value) {
return $execution;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not treat closed-run reuse failures as UseExisting successes

When UseExisting is set but the duplicate is a previously closed execution, the service can still return WorkflowExecutionAlreadyStartedFailure because the workflow ID reuse policy rejects the closed run (for example the default AllowDuplicateFailedOnly after a successful completion, or RejectDuplicate). This branch checks only the conflict policy, so it returns a handle to that closed run instead of throwing WorkflowExecutionAlreadyStartedException, making start()/signalWithStart() report success even though no running workflow was reused.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant