-
Notifications
You must be signed in to change notification settings - Fork 90
Add links and callbacks support for standalone activity #759
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?
Changes from all commits
6f68c8a
9c2b18d
24adc68
8f0dabc
93a57ae
8f2ca2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2931,13 +2931,21 @@ message StartActivityExecutionRequest { | |
| temporal.api.sdk.v1.UserMetadata user_metadata = 17; | ||
| // Priority metadata. | ||
| temporal.api.common.v1.Priority priority = 18; | ||
| // Callbacks to be called by the server when this activity reaches a terminal state. | ||
| // Callback addresses must be whitelisted in the server's dynamic configuration. | ||
| repeated temporal.api.common.v1.Callback completion_callbacks = 19; | ||
| // Links to be associated with the activity. Callbacks may also have associated links; | ||
| // links already included with a callback should not be duplicated here. | ||
| repeated temporal.api.common.v1.Link links = 20; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SAA PR only uses links on the callback. Is it necessary/appropriate to add these top-level links in addition to the callback links? If so, could the Nexus team give a refresher on what the respective roles are of the two links (I had it in my head that top-level were deprecated). |
||
| } | ||
|
|
||
| message StartActivityExecutionResponse { | ||
| // The run ID of the activity that was started - or used (via ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING). | ||
| string run_id = 1; | ||
| // If true, a new activity was started. | ||
| bool started = 2; | ||
| // Link to the started activity. | ||
| temporal.api.common.v1.Link link = 3; | ||
| } | ||
|
|
||
| message DescribeActivityExecutionRequest { | ||
|
|
@@ -2974,6 +2982,9 @@ message DescribeActivityExecutionResponse { | |
|
|
||
| // Token for follow-on long-poll requests. Absent only if the activity is complete. | ||
| bytes long_poll_token = 5; | ||
|
|
||
| // Callbacks attached to this activity execution and their current state. | ||
| repeated temporal.api.workflow.v1.CallbackInfo callbacks = 6; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This // CallbackInfo contains the state of an attached workflow callback.
message CallbackInfo {
// Trigger for when the workflow is closed.
message WorkflowClosed {}
message Trigger {
oneof variant {
WorkflowClosed workflow_closed = 1;
}
}We either need to make it more general, or add an activity-specific |
||
| } | ||
|
|
||
| message PollActivityExecutionRequest { | ||
|
|
||
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.
A reader is going to think initially these are links that in some way refer to this activity. However, they're not -- they're links pointing to other entities associated with the activity; typically the entity that started the activity. Let's clarify this for the reader, here and in the workflow counterpart
HistoryEvent.links. As an author of a Nexus SDK I found this confusing at first, so there's not much doubt that other users will benefit from some help here.