@@ -178,6 +178,33 @@ public virtual Task<OrchestrationMetadata> WaitForInstanceStartAsync(
178
178
string instanceId , CancellationToken cancellation )
179
179
=> this . WaitForInstanceStartAsync ( instanceId , false , cancellation ) ;
180
180
181
+ /// <summary>
182
+ /// Suspends an orchestration instance, halting processing of it until <see cref="ResumeInstanceAsync" /> is used
183
+ /// to resume the orchestration.
184
+ /// </summary>
185
+ /// <param name="instanceId">The instance ID of the orchestration to suspend.</param>
186
+ /// <param name="reason">The optional suspension reason.</param>
187
+ /// <param name="cancellation">
188
+ /// A <see cref="CancellationToken"/> that can be used to cancel the suspend operation. Note, cancelling this token
189
+ /// does <b>not</b> resume the orchestration if suspend was successful.
190
+ /// </param>
191
+ /// <returns>A task that completes when the suspend has been committed to the backend.</returns>
192
+ public abstract Task SuspendInstanceAsync (
193
+ string instanceId , string ? reason = null , CancellationToken cancellation = default ) ;
194
+
195
+ /// <summary>
196
+ /// Resumes an orchestration instance that was suspended via <see cref="SuspendInstanceAsync" />.
197
+ /// </summary>
198
+ /// <param name="instanceId">The instance ID of the orchestration to resume.</param>
199
+ /// <param name="reason">The optional resume reason.</param>
200
+ /// <param name="cancellation">
201
+ /// A <see cref="CancellationToken"/> that can be used to cancel the resume operation. Note, cancelling this token
202
+ /// does <b>not</b> re-suspend the orchestration if resume was successful.
203
+ /// </param>
204
+ /// <returns>A task that completes when the resume has been committed to the backend.</returns>
205
+ public abstract Task ResumeInstanceAsync (
206
+ string instanceId , string ? reason = null , CancellationToken cancellation = default ) ;
207
+
181
208
/// <summary>
182
209
/// Waits for an orchestration to start running and returns a <see cref="OrchestrationMetadata"/>
183
210
/// object that contains metadata about the started instance.
0 commit comments