Skip to content

feat: add CancelReason sample - #80

Open
xepozz wants to merge 3 commits into
masterfrom
feature/workflow-cancel-reason
Open

xepozz wants to merge 3 commits into
masterfrom
feature/workflow-cancel-reason

Conversation

@xepozz

@xepozz xepozz commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Add the CancelReason sample: cancel a workflow with a reason and read the reason in the workflow. Requires temporal/sdk ^2.21 and rr ^3.3; the feature test bootstrap follows the 2.21 Environment API.

What was changed

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Cancel a workflow with a reason and read the reason in the workflow.
@xepozz
xepozz requested review from a team, roxblnfk and wolfy-j as code owners December 2, 2026 05:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T05:45:43.138148Z 002b1f8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 002b1f86e6

ℹ️ 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 thread app/src/CancelReason/ExecuteCommand.php Outdated
$output->writeln("Canceling the workflow with a reason... ");
$this->workflowClient
->newUntypedRunningWorkflowStub($run->getExecution()->getID())
->cancel('The order was withdrawn by the customer');

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 Update the SDK dependency to support cancellation reasons

With the documented composer install setup, app/composer.lock still installs temporal/sdk v2.17.1, whereas this commit explicitly depends on the cancellation-reason support from sdk-php#863. No dependency update or additional setup instruction accompanies the sample, so users following its README cannot demonstrate the advertised reason propagation with the committed dependencies. Update the SDK requirement and lockfile to a release containing that support.

Useful? React with 👍 / 👎.

The sample needs both for the cancellation reason. sdk 2.21 needs the test server from dload and an array rr command.
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