Jaa


BotFrameworkClient.PostActivityAsync Method

Definition

Overloads

PostActivityAsync(String, String, Uri, Uri, String, Activity, CancellationToken)

Forwards an activity to a skill (bot).

PostActivityAsync<T>(String, String, Uri, Uri, String, Activity, CancellationToken)

Forwards an activity to a skill (bot).

PostActivityAsync(String, String, Uri, Uri, String, Activity, CancellationToken)

Forwards an activity to a skill (bot).

public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse> PostActivityAsync (string fromBotId, string toBotId, Uri toUrl, Uri serviceUrl, string conversationId, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
abstract member PostActivityAsync : string * string * Uri * Uri * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse>
override this.PostActivityAsync : string * string * Uri * Uri * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse>
Public Overridable Function PostActivityAsync (fromBotId As String, toBotId As String, toUrl As Uri, serviceUrl As Uri, conversationId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of InvokeResponse)

Parameters

fromBotId
String

The MicrosoftAppId of the bot sending the activity.

toBotId
String

The MicrosoftAppId of the bot receiving the activity.

toUrl
Uri

The URL of the bot receiving the activity.

serviceUrl
Uri

The callback Url for the skill host.

conversationId
String

A conversation ID to use for the conversation with the skill.

activity
Activity

The Activity to send to forward.

cancellationToken
CancellationToken

cancellation Token.

Returns

Async task with optional invokeResponse.

Remarks

NOTE: Forwarding an activity to a skill will flush UserState and ConversationState changes so that skill has accurate state.

Applies to

PostActivityAsync<T>(String, String, Uri, Uri, String, Activity, CancellationToken)

Forwards an activity to a skill (bot).

public abstract System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse<T>> PostActivityAsync<T> (string fromBotId, string toBotId, Uri toUrl, Uri serviceUrl, string conversationId, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
abstract member PostActivityAsync : string * string * Uri * Uri * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse<'T>>
Public MustOverride Function PostActivityAsync(Of T) (fromBotId As String, toBotId As String, toUrl As Uri, serviceUrl As Uri, conversationId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of InvokeResponse(Of T))

Type Parameters

T

The type of body in the InvokeResponse.

Parameters

fromBotId
String

The MicrosoftAppId of the bot sending the activity.

toBotId
String

The MicrosoftAppId of the bot receiving the activity.

toUrl
Uri

The URL of the bot receiving the activity.

serviceUrl
Uri

The callback Url for the skill host.

conversationId
String

A conversation ID to use for the conversation with the skill.

activity
Activity

The Activity to send to forward.

cancellationToken
CancellationToken

cancellation Token.

Returns

Async task with optional invokeResponse.

Remarks

NOTE: Forwarding an activity to a skill will flush UserState and ConversationState changes so that skill has accurate state.

Applies to