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

Activity APIs cleanup. #105

Merged
merged 5 commits into from
Jun 22, 2020
Merged

Activity APIs cleanup. #105

merged 5 commits into from
Jun 22, 2020

Conversation

mfateev
Copy link
Member

@mfateev mfateev commented Jun 17, 2020

Exposes ActivityExecutionContext to simplify passing activity info around to other threads. Removed redundant methods from Activity class. Also some renaming for consistency. Changed some getters to return Optional instead of null.

Also fixes #98

*/
public interface ActivityCompletionClient {

<R> void complete(byte[] taskToken, R result) throws ActivityCompletionException;

<R> void complete(WorkflowExecution execution, String activityId, R result)
<R> void complete(String workflowId, Optional<String> runId, String activityId, R result)

Choose a reason for hiding this comment

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

It feels weird to have optional parameter in the middle of signature. It is considered very bad practice to have required parameters after optional ones.

@mfateev mfateev merged commit d5a0952 into temporalio:master Jun 22, 2020
@mfateev mfateev deleted the activity_cleanup branch June 22, 2020 04:52
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.

NPE on null input when calling continue as new
2 participants