@@ -16,7 +16,6 @@ namespace Dapr.Workflow
1616 using System ;
1717 using System . Threading ;
1818 using System . Threading . Tasks ;
19- using Microsoft . DurableTask ;
2019
2120 /// <summary>
2221 /// Context object used by workflow implementations to perform actions such as scheduling activities, durable timers, waiting for
@@ -101,7 +100,7 @@ public abstract class WorkflowContext
101100 /// The activity failed with an unhandled exception. The details of the failure can be found in the
102101 /// <see cref="WorkflowTaskFailedException.FailureDetails"/> property.
103102 /// </exception>
104- public virtual Task CallActivityAsync ( string name , object ? input = null , TaskOptions ? options = null )
103+ public virtual Task CallActivityAsync ( string name , object ? input = null , WorkflowTaskOptions ? options = null )
105104 {
106105 return this . CallActivityAsync < object > ( name , input , options ) ;
107106 }
@@ -110,7 +109,7 @@ public virtual Task CallActivityAsync(string name, object? input = null, TaskOpt
110109 /// A task that completes when the activity completes or fails. The result of the task is the activity's return value.
111110 /// </returns>
112111 /// <inheritdoc cref="CallActivityAsync"/>
113- public abstract Task < T > CallActivityAsync < T > ( string name , object ? input = null , TaskOptions ? options = null ) ;
112+ public abstract Task < T > CallActivityAsync < T > ( string name , object ? input = null , WorkflowTaskOptions ? options = null ) ;
114113
115114 /// <summary>
116115 /// Creates a durable timer that expires after the specified delay.
@@ -212,8 +211,11 @@ public virtual Task CreateTimer(TimeSpan delay, CancellationToken cancellationTo
212211 /// <typeparam name="TResult">
213212 /// The type into which to deserialize the child workflow's output.
214213 /// </typeparam>
215- /// <inheritdoc cref="CallChildWorkflowAsync(string, object?, TaskOptions?)"/>
216- public abstract Task < TResult > CallChildWorkflowAsync < TResult > ( string workflowName , object ? input = null , TaskOptions ? options = null ) ;
214+ /// <inheritdoc cref="CallChildWorkflowAsync(string, object?, ChildWorkflowTaskOptions?)"/>
215+ public abstract Task < TResult > CallChildWorkflowAsync < TResult > (
216+ string workflowName ,
217+ object ? input = null ,
218+ ChildWorkflowTaskOptions ? options = null ) ;
217219
218220 /// <summary>
219221 /// Executes the specified workflow as a child workflow.
@@ -222,7 +224,8 @@ public virtual Task CreateTimer(TimeSpan delay, CancellationToken cancellationTo
222224 /// <para>
223225 /// In addition to activities, workflows can schedule other workflows as <i>child workflows</i>.
224226 /// A child workflow has its own instance ID, history, and status that is independent of the parent workflow
225- /// that started it.
227+ /// that started it. You can use <see cref="ChildWorkflowTaskOptions.InstanceId" /> to specify an instance ID
228+ /// for the child workflow. Otherwise, the instance ID will be randomly generated.
226229 /// </para><para>
227230 /// Child workflows have many benefits:
228231 /// <list type="bullet">
@@ -237,15 +240,14 @@ public virtual Task CreateTimer(TimeSpan delay, CancellationToken cancellationTo
237240 /// exception. Child workflows also support automatic retry policies.
238241 /// </para><para>
239242 /// Because child workflows are independent of their parents, terminating a parent workflow does not affect
240- /// any child workflows. You must terminate each child workflow independently using its instance ID, which is
241- /// specified by supplying <see cref="SubOrchestrationOptions" /> in place of <see cref="TaskOptions " />.
243+ /// any child workflows. You must terminate each child workflow independently using its instance ID, which
244+ /// is specified by <see cref="ChildWorkflowTaskOptions.InstanceId " />.
242245 /// </para>
243246 /// </remarks>
244247 /// <param name="workflowName">The name of the workflow to call.</param>
245248 /// <param name="input">The serializable input to pass to the child workflow.</param>
246249 /// <param name="options">
247- /// Additional options that control the execution and processing of the child workflow. Callers can choose to
248- /// supply the derived type <see cref="SubOrchestrationOptions" />.
250+ /// Additional options that control the execution and processing of the child workflow.
249251 /// </param>
250252 /// <returns>A task that completes when the child workflow completes or fails.</returns>
251253 /// <exception cref="ArgumentException">The specified workflow does not exist.</exception>
@@ -256,7 +258,10 @@ public virtual Task CreateTimer(TimeSpan delay, CancellationToken cancellationTo
256258 /// The child workflow failed with an unhandled exception. The details of the failure can be found in the
257259 /// <see cref="WorkflowTaskFailedException.FailureDetails"/> property.
258260 /// </exception>
259- public virtual Task CallChildWorkflowAsync ( string workflowName , object ? input = null , TaskOptions ? options = null )
261+ public virtual Task CallChildWorkflowAsync (
262+ string workflowName ,
263+ object ? input = null ,
264+ ChildWorkflowTaskOptions ? options = null )
260265 {
261266 return this . CallChildWorkflowAsync < object > ( workflowName , input , options ) ;
262267 }
0 commit comments