Skip to content
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

Add method to get workflow client from an activity #2369

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

Quinn-With-Two-Ns
Copy link
Contributor

Add method to get workflow client from an activity.

closes #2362

@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner January 15, 2025 16:13
* Get a {@link WorkflowClient} that can be used to start interact with the Temporal service from
* an activity.
*/
WorkflowClient getWorkflowClient();
Copy link
Member

@cretz cretz Jan 15, 2025

Choose a reason for hiding this comment

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

I assume we don't expect users to have their own implementations of ActivityExecutionContext? I know we have a TestActivityEnvironment, just wanted to check. If you do make another commit in this PR, may be worth a warning at the top of this interface saying that methods may be added without default implementations and that users should not implement this interface. Otherwise we should consider a default implementation that throws.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have ActivityExecutionContextBase if users want to provide their own wrapper implementation but not have to implement every method.

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit 35e390e into temporalio:master Jan 15, 2025
8 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.

Provide client from activity context
2 participants