SkillDialog Class
- java.
lang. Object - com.
microsoft. bot. dialogs. Dialog - com.
microsoft. bot. dialogs. SkillDialog
- com.
- com.
public class SkillDialog
extends Dialog
A specialized Dialog that can wrap remote calls to a skill. The options parameter in BeginDialog must be a BeginSkillDialogOptions instancewith the initial parameters for the dialog.
Constructor Summary
| Constructor | Description |
|---|---|
| SkillDialog(SkillDialogOptions dialogOptions, String dialogId) |
Initializes a new instance of the SkillDialog class to wrap remote calls to a skill. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
java.util.concurrent.CompletableFuture<Dialog |
beginDialog(DialogContext dc, Object options)
Called when the skill dialog is started and pushed onto the dialog stack. |
|
java.util.concurrent.CompletableFuture<Dialog |
continueDialog(DialogContext dc)
Called when the skill dialog is _continued_, where it is the active dialog and the user replies with a new activity. |
| java.util.concurrent.CompletableFuture<java.lang.Void> |
endDialog(TurnContext turnContext, DialogInstance instance, DialogReason reason)
Called when the skill dialog is ending. |
|
protected
Skill |
getDialogOptions()
Gets the options used to execute the skill dialog. |
| protected boolean |
onValidateActivity(Activity activity)
Validates the activity sent during Continue |
| java.util.concurrent.CompletableFuture<java.lang.Void> |
repromptDialog(TurnContext turnContext, DialogInstance instance)
Called when the skill dialog should re-prompt the user for input. |
|
java.util.concurrent.CompletableFuture<Dialog |
resumeDialog(DialogContext dc, DialogReason reason, Object result)
Called when a child skill dialog completed its turn, returning control to this dialog. |
Methods inherited from Dialog
Methods inherited from java.lang.Object
Constructor Details
SkillDialog
public SkillDialog(SkillDialogOptions dialogOptions, String dialogId)
Initializes a new instance of the SkillDialog class to wrap remote calls to a skill.
Parameters:
Method Details
beginDialog
public CompletableFuture
Called when the skill dialog is started and pushed onto the dialog stack.
Overrides:
SkillDialog.beginDialog(DialogContext dc, Object options)Parameters:
Returns:
If the task is successful, the result indicates whether the dialog is
still active after the turn has been processed by the dialog.
continueDialog
public CompletableFuture
Called when the skill dialog is _continued_, where it is the active dialog and the user replies with a new activity.
Overrides:
SkillDialog.continueDialog(DialogContext dc)Parameters:
Returns:
If the task is successful, the result indicates whether the dialog is
still active after the turn has been processed by the dialog. The
result may also contain a return value.
endDialog
public CompletableFuture
Called when the skill dialog is ending.
Overrides:
SkillDialog.endDialog(TurnContext turnContext, DialogInstance instance, DialogReason reason)Parameters:
Returns:
getDialogOptions
protected SkillDialogOptions getDialogOptions()
Gets the options used to execute the skill dialog.
Returns:
onValidateActivity
protected boolean onValidateActivity(Activity activity)
Validates the activity sent during ContinueDialog .
Parameters:
Override this method to implement a custom validator for the
activity being sent during the ContinueDialog . This
method can be used to ignore activities of a certain type if
needed. If this method returns false, the dialog will end the
turn without processing the activity.
Returns:
repromptDialog
public CompletableFuture
Called when the skill dialog should re-prompt the user for input.
Overrides:
SkillDialog.repromptDialog(TurnContext turnContext, DialogInstance instance)Parameters:
Returns:
resumeDialog
public CompletableFuture
Called when a child skill dialog completed its turn, returning control to this dialog.
Overrides:
SkillDialog.resumeDialog(DialogContext dc, DialogReason reason, Object result)Parameters:
Returns: