-
Notifications
You must be signed in to change notification settings - Fork 371
Implement ListInstanceIDs, GetInstanceHistory, and RerunWorkflowFromEvent workflow RPCs #1738
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| // ------------------------------------------------------------------------ | ||
| // Copyright 2026 The Dapr Authors | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // ------------------------------------------------------------------------ | ||
|
|
||
| namespace Dapr.Workflow.Client; | ||
|
|
||
| /// <summary> | ||
| /// Options for the <see cref="Dapr.Workflow.IDaprWorkflowClient.RerunWorkflowFromEventAsync"/> operation. | ||
| /// </summary> | ||
| public sealed class RerunWorkflowFromEventOptions | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets the new instance ID to use for the rerun workflow instance. | ||
| /// If not specified, a random instance ID will be generated. | ||
| /// </summary> | ||
| public string? NewInstanceId { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the optional input to provide when rerunning the workflow, applied at the | ||
| /// next activity event. When set, <see cref="OverwriteInput"/> must also be set to <c>true</c>. | ||
| /// </summary> | ||
| public object? Input { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets a value indicating whether the workflow's input at the rerun point (for the | ||
| /// next activity event) should be overwritten with <see cref="Input"/>. | ||
| /// </summary> | ||
| public bool OverwriteInput { get; set; } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| // ------------------------------------------------------------------------ | ||
| // Copyright 2026 The Dapr Authors | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // ------------------------------------------------------------------------ | ||
|
|
||
| using System; | ||
|
|
||
| namespace Dapr.Workflow.Client; | ||
|
|
||
| /// <summary> | ||
| /// Represents a single event in a workflow instance's history. | ||
| /// </summary> | ||
| /// <param name="EventId">The unique event ID within the workflow instance history.</param> | ||
| /// <param name="EventType">The type of history event.</param> | ||
| /// <param name="Timestamp">The timestamp when the event occurred.</param> | ||
| public sealed record WorkflowHistoryEvent( | ||
| int EventId, | ||
| WorkflowHistoryEventType EventType, | ||
| DateTime Timestamp); | ||
|
|
||
| /// <summary> | ||
| /// Represents the type of a workflow history event. | ||
| /// </summary> | ||
| public enum WorkflowHistoryEventType | ||
| { | ||
| /// <summary>Unknown event type.</summary> | ||
| Unknown = 0, | ||
|
|
||
| /// <summary>The workflow execution started.</summary> | ||
| ExecutionStarted, | ||
|
|
||
| /// <summary>The workflow execution completed.</summary> | ||
| ExecutionCompleted, | ||
|
|
||
| /// <summary>The workflow execution was terminated.</summary> | ||
| ExecutionTerminated, | ||
|
|
||
| /// <summary>A task (activity) was scheduled.</summary> | ||
| TaskScheduled, | ||
|
|
||
| /// <summary>A task (activity) completed successfully.</summary> | ||
| TaskCompleted, | ||
|
|
||
| /// <summary>A task (activity) failed.</summary> | ||
| TaskFailed, | ||
|
|
||
| /// <summary>A sub-orchestration instance was created.</summary> | ||
| SubOrchestrationInstanceCreated, | ||
|
|
||
| /// <summary>A sub-orchestration instance completed.</summary> | ||
| SubOrchestrationInstanceCompleted, | ||
|
|
||
| /// <summary>A sub-orchestration instance failed.</summary> | ||
| SubOrchestrationInstanceFailed, | ||
|
|
||
| /// <summary>A timer was created.</summary> | ||
| TimerCreated, | ||
|
|
||
| /// <summary>A timer fired.</summary> | ||
| TimerFired, | ||
|
|
||
| /// <summary>An orchestrator started processing.</summary> | ||
| OrchestratorStarted, | ||
|
|
||
| /// <summary>An orchestrator completed processing.</summary> | ||
| OrchestratorCompleted, | ||
|
|
||
| /// <summary>An event was sent to another instance.</summary> | ||
| EventSent, | ||
|
|
||
| /// <summary>An external event was raised.</summary> | ||
| EventRaised, | ||
|
|
||
| /// <summary>A generic event.</summary> | ||
| GenericEvent, | ||
|
|
||
| /// <summary>A history state event.</summary> | ||
| HistoryState, | ||
|
|
||
| /// <summary>The workflow continued as new.</summary> | ||
| ContinueAsNew, | ||
|
|
||
| /// <summary>The workflow execution was suspended.</summary> | ||
| ExecutionSuspended, | ||
|
|
||
| /// <summary>The workflow execution was resumed.</summary> | ||
| ExecutionResumed, | ||
|
|
||
| /// <summary>The workflow execution stalled.</summary> | ||
| ExecutionStalled, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // ------------------------------------------------------------------------ | ||
| // Copyright 2026 The Dapr Authors | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // ------------------------------------------------------------------------ | ||
|
|
||
| using System.Collections.Generic; | ||
|
|
||
| namespace Dapr.Workflow.Client; | ||
|
|
||
| /// <summary> | ||
| /// Represents a page of workflow instance IDs returned by a list operation. | ||
| /// </summary> | ||
| /// <param name="InstanceIds">The workflow instance IDs in this page.</param> | ||
| /// <param name="ContinuationToken"> | ||
| /// The continuation token used to retrieve the next page, or <c>null</c> if there are no more pages. | ||
| /// </param> | ||
| public sealed record WorkflowInstancePage( | ||
| IReadOnlyList<string> InstanceIds, | ||
| string? ContinuationToken); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.