-
Notifications
You must be signed in to change notification settings - Fork 163
Add support for activity reset #2546
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With some other SDKs, we have also provided a way to activities to see all states that may affect cancellation even though only one is thrown. We call it "cancellation details". I wonder if we should provide something like that in Java on the activity context (so they can see bools for cancel requested, paused, reset, etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should there is a separate issue for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some thoughts on priority/ordering between pause and reset
} else if (status.getActivityPaused()) { | ||
throw new ActivityPausedException(); | ||
} else if (status.getActivityReset()) { | ||
throw new ActivityResetException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the ordering here matters.
What happens if a client issues a pause and a reset before the next heartbeat?
In principle, I think we would want to give precedence to reset. Reset > pause would be consistent with the priority/ordering in core as well
} else if (status.getActivityPaused()) { | ||
throw new ActivityPausedException(); | ||
} else if (status.getActivityReset()) { | ||
throw new ActivityResetException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
} else if (status.getActivityReset()) { | ||
lastException = new ActivityResetException(info); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here as well
// assumeTrue( | ||
// "Test Server doesn't support activity pause", SDKTestWorkflowRule.useExternalService); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old comment?
Add support for activity reset
closes #2488