BeginSkill class
Begin a Skill.
- Extends
-
SkillDialog
Constructors
Begin |
Creates a new `BeginSkillDialog instance. |
Properties
$kind | |
activity | Template for the activity. |
activity |
Value indicating whether the new dialog should process the activity. |
allow |
The interruption policy. |
bot |
The Microsoft App ID that will be calling the skill. |
connection |
Optional. The OAuth Connection Name for the Parent Bot. |
disabled | Optional expression which if is true will disable this action. |
result |
Optional property path to store the dialog result in. |
skill |
The Microsoft App ID for the skill. |
skill |
The |
skill |
The callback Url for the skill host. |
Inherited Properties
End |
Gets a default end-of-turn result. |
id | |
telemetry |
Methods
begin |
Called when the Dialog is started and pushed onto the dialog stack. |
continue |
Called when the Dialog is continued, where it is the active dialog and the user replies with a new activity. |
end |
Called when the Dialog is ending. |
get |
|
reprompt |
Called when the Dialog should re-prompt the user for input. |
resume |
Called when a child Dialog completed its turn, returning control to this dialog. |
Inherited Methods
configure(Record<string, unknown>) | Fluent method for configuring the object. |
get |
An encoded string used to aid in the detection of bot changes on re-deployment. |
on |
Called when an event has been raised, using |
Constructor Details
BeginSkill(SkillDialogOptions)
Creates a new `BeginSkillDialog instance.
new BeginSkill(options?: SkillDialogOptions)
Parameters
- options
-
SkillDialogOptions
Optional options used to configure the skill dialog.
Property Details
$kind
static $kind: string
Property Value
string
activity
Template for the activity.
activity: TemplateInterface<Partial<Activity>, DialogStateManager>
Property Value
TemplateInterface<Partial<Activity>, DialogStateManager>
activityProcessed
Value indicating whether the new dialog should process the activity.
activityProcessed: BoolExpression
Property Value
BoolExpression
Remarks
The default for this will be true, which means the new dialog should not look at the activity. You can set this to false to dispatch the activity to the new dialog.
allowInterruptions
The interruption policy.
allowInterruptions: BoolExpression
Property Value
BoolExpression
botId
The Microsoft App ID that will be calling the skill.
botId: StringExpression
Property Value
StringExpression
Remarks
Defauls to a value of =settings.MicrosoftAppId
which retrievs the bots ID from settings.
connectionName
Optional. The OAuth Connection Name for the Parent Bot.
connectionName: StringExpression
Property Value
StringExpression
disabled
Optional expression which if is true will disable this action.
disabled?: BoolExpression
Property Value
BoolExpression
resultProperty
Optional property path to store the dialog result in.
resultProperty?: StringExpression
Property Value
StringExpression
skillAppId
The Microsoft App ID for the skill.
skillAppId: StringExpression
Property Value
StringExpression
skillEndpoint
The /api/messages
endpoint for the skill.
skillEndpoint: StringExpression
Property Value
StringExpression
skillHostEndpoint
The callback Url for the skill host.
skillHostEndpoint: StringExpression
Property Value
StringExpression
Remarks
Defauls to a value of =settings.SkillHostEndpoint
which retrieves the endpoint from settings.
Inherited Property Details
EndOfTurn
Gets a default end-of-turn result.
static EndOfTurn: DialogTurnResult
Property Value
DialogTurnResult
Remarks
This result indicates that a dialog (or a logical step within a dialog) has completed processing for the current turn, is still active, and is waiting for more input.
Inherited From Dialog.EndOfTurn
id
id: string
Property Value
string
Inherited From Dialog.id
telemetryClient
telemetryClient: BotTelemetryClient
Property Value
BotTelemetryClient
Inherited From Dialog.telemetryClient
Method Details
beginDialog(DialogContext, BeginSkillDialogOptions)
Called when the Dialog is started and pushed onto the dialog stack.
function beginDialog(dc: DialogContext, options?: BeginSkillDialogOptions): Promise<DialogTurnResult>
Parameters
- dc
-
DialogContext
The DialogContext for the current turn of conversation.
- options
-
BeginSkillDialogOptions
Optional. Initial information to pass to the dialog.
Returns
Promise<DialogTurnResult>
A Promise
representing the asynchronous operation.
continueDialog(DialogContext)
Called when the Dialog is continued, where it is the active dialog and the user replies with a new activity.
function continueDialog(dc: DialogContext): Promise<DialogTurnResult>
Parameters
- dc
-
DialogContext
The DialogContext for the current turn of conversation.
Returns
Promise<DialogTurnResult>
A Promise
representing the asynchronous operation.
endDialog(TurnContext, DialogInstance, DialogReason)
Called when the Dialog is ending.
function endDialog(turnContext: TurnContext, instance: DialogInstance, reason: DialogReason): Promise<void>
Parameters
- turnContext
-
TurnContext
(xref:botbuilder-core.TurnContext), the context object for this turn.
- instance
-
DialogInstance
(xref:botbuilder-dialogs.DialogInstance), state information associated with the instance of this dialog on the dialog stack.
- reason
-
DialogReason
(xref:botbuilder-dialogs.DialogReason), reason why the dialog ended.
Returns
Promise<void>
A Promise
representing the asynchronous operation.
getConverter(Object)
function getConverter(property: Object): Converter | ConverterFactory
Parameters
- property
-
Object
The key of the conditional selector configuration.
Returns
Converter | ConverterFactory
The converter for the selector configuration.
repromptDialog(TurnContext, DialogInstance)
Called when the Dialog should re-prompt the user for input.
function repromptDialog(turnContext: TurnContext, instance: DialogInstance): Promise<void>
Parameters
- turnContext
-
TurnContext
(xref:botbuilder-core.TurnContext), the context object for this turn.
- instance
-
DialogInstance
(xref:botbuilder-dialogs.DialogInstance), state information for this dialog.
Returns
Promise<void>
A Promise
representing the asynchronous operation.
resumeDialog(DialogContext, DialogReason, any)
Called when a child Dialog completed its turn, returning control to this dialog.
function resumeDialog(dc: DialogContext, reason: DialogReason, result?: any): Promise<DialogTurnResult<any>>
Parameters
- dc
-
DialogContext
The DialogContext for the current turn of conversation.
- reason
-
DialogReason
(xref:botbuilder-dialogs.DialogReason), reason why the dialog resumed.
- result
-
any
Optional. Value returned from the dialog that was called. The type of the value returned is dependent on the child dialog.
Returns
Promise<DialogTurnResult<any>>
A Promise
representing the asynchronous operation.
Inherited Method Details
configure(Record<string, unknown>)
Fluent method for configuring the object.
function configure(config: Record<string, unknown>): this
Parameters
- config
-
Record<string, unknown>
Configuration settings to apply.
Returns
this
The Configurable after the operation is complete.
Inherited From Configurable.configure
getVersion()
An encoded string used to aid in the detection of bot changes on re-deployment.
function getVersion(): string
Returns
string
Unique string which should only change when dialog has changed in a way that should restart the dialog.
Remarks
This defaults to returning the dialogs id but can be overridden to provide more
precise change detection logic. Any dialog on the stack that has its version change will
result in a versionChanged
event will be raised. If this event is not handled by the bot,
an error will be thrown resulting in the bots error handler logic being run.
Returning an empty string will disable version tracking for the component all together.
Inherited From Dialog.getVersion
onDialogEvent(DialogContext, DialogEvent)
Called when an event has been raised, using DialogContext.emitEvent()
, by either the current dialog or a dialog that the current dialog started.
function onDialogEvent(dc: DialogContext, e: DialogEvent): Promise<boolean>
Parameters
- dc
-
DialogContext
The dialog context for the current turn of conversation.
- e
-
DialogEvent
The event being raised.
Returns
Promise<boolean>
True if the event is handled by the current dialog and bubbling should stop.
Inherited From Dialog.onDialogEvent