Skip to content

Revamp Java/PHP/TS Continue-as-New documentation #3606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 30, 2025

Conversation

yuandrew
Copy link
Contributor

@yuandrew yuandrew commented Jun 7, 2025

What does this PR do?

Update language specific CaN docs, similar to #3579

Notes to reviewers

Docs should match Go and Python, just with the sample code and links specific to the language.

@yuandrew yuandrew requested a review from a team as a code owner June 7, 2025 16:03
@yuandrew yuandrew marked this pull request as draft June 9, 2025 17:31
@yuandrew
Copy link
Contributor Author

yuandrew commented Jun 9, 2025

Marking as draft to update dotnet, previously thought we were blocked for dotnet docs, but I was mistaken.

@yuandrew
Copy link
Contributor Author

dotnet has been added, ready for review

@yuandrew yuandrew marked this pull request as ready for review June 10, 2025 08:07
Inside your Workflow, call the [`ContinueAsNew()`](https://typescript.temporal.io/api/classes/workflow.ContinueAsNew) function with the same type.
This stops the Workflow right away and starts a new one.

<div class="copycode-notice-container">
Copy link
Contributor

Choose a reason for hiding this comment

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

One nit -- is this actually showing a ContineuAsNew() function being called? This looks like we're returning wf.continueAsNew instead of calling something. Language can sometimes get confusing here when porting between eg Go and TS, so I'm not sure if this is what happened. These are also very, very short code samples; if it were up to me I think they might be easier to read if they looked something like:

## Your other Workflow code
...
ContinueAsNew()

But I don't feel too strongly about that.

Anyway -- after clarifying this sample I think we're good to merge!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh good callout, the issue is actually that I linked the wrong continueAsNew method, pushed a fix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As for the Your other Workflow code suggestion, I decided against it because this is linking directly to the typescript sample, they can click on the link to view the whole sample for how it fits into the workflow

@axfelix axfelix merged commit 2348d94 into temporalio:main Jun 30, 2025
4 checks passed
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.

2 participants