Skip to content

Commit 6272619

Browse files
authored
Merge pull request #19 from JoshVanL/workflow-list-get-history
Workflow List and History RPCs for Durable Task
2 parents 1a63d40 + 5d4bd98 commit 6272619

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

protos/backend_service.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ service BackendService {
7878

7979
// Returns the current metrics for the backend service.
8080
rpc GetMetrics (GetMetricsRequest) returns (GetMetricsResponse);
81+
82+
rpc ListInstanceIDs (ListInstanceIDsRequest) returns (ListInstanceIDsResponse);
83+
rpc GetInstanceHistory (GetInstanceHistoryRequest) returns (GetInstanceHistoryResponse);
8184
}
8285

8386
// Request payload for adding new orchestration events.

protos/orchestrator_service.proto

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,9 @@ service TaskHubSidecarService {
739739

740740
// Rerun a Workflow from a specific event ID of a workflow instance.
741741
rpc RerunWorkflowFromEvent(RerunWorkflowFromEventRequest) returns (RerunWorkflowFromEventResponse);
742+
743+
rpc ListInstanceIDs (ListInstanceIDsRequest) returns (ListInstanceIDsResponse);
744+
rpc GetInstanceHistory (GetInstanceHistoryRequest) returns (GetInstanceHistoryResponse);
742745
}
743746

744747
message GetWorkItemsRequest {
@@ -820,3 +823,36 @@ message RerunWorkflowFromEventRequest {
820823
message RerunWorkflowFromEventResponse {
821824
string newInstanceID = 1;
822825
}
826+
827+
// ListInstanceIDsRequest is used to list all orchestration instances.
828+
message ListInstanceIDsRequest {
829+
// continuationToken is the continuation token to use for pagination. This
830+
// is the token which the next page should start from. If not given, the
831+
// first page will be returned.
832+
optional string continuationToken = 1;
833+
834+
// pageSize is the maximum number of instances to return for this page. If
835+
// not given, all instances will be attempted to be returned.
836+
optional uint32 pageSize = 2;
837+
}
838+
839+
// ListInstanceIDsResponse is the response to executing ListInstanceIDs.
840+
message ListInstanceIDsResponse {
841+
// instanceIds is the list of instance IDs returned.
842+
repeated string instanceIds = 1;
843+
844+
// continuationToken is the continuation token to use for pagination. If
845+
// there are no more pages, this will be null.
846+
optional string continuationToken = 2;
847+
}
848+
849+
// GetInstanceHistoryRequest is used to get the full history of an
850+
// orchestration instance.
851+
message GetInstanceHistoryRequest {
852+
string instanceId = 1;
853+
}
854+
855+
// GetInstanceHistoryResponse is the response to executing GetInstanceHistory.
856+
message GetInstanceHistoryResponse {
857+
repeated HistoryEvent events = 1;
858+
}

0 commit comments

Comments
 (0)