WaterfallStepContext Class

public class WaterfallStepContext
extends DialogContext

Provides context for a step in a WaterfallDialog . The DialogContext property contains the TurnContext for the current turn.

Constructor Summary

Constructor Description
WaterfallStepContext(WaterfallDialog parentWaterfall, DialogContext dc, Object options, Map<String,Object> values, int index, DialogReason reason, Object result)

Initializes a new instance of the WaterfallStepContext class.

Method Summary

Modifier and Type Method and Description
int getIndex()

Gets the index of the current waterfall step being executed.

java.lang.Object getOptions()

Gets any options the waterfall dialog was called with.

DialogReason getReason()

Gets the reason the waterfall step is being executed.

java.lang.Object getResult()

Gets the result from the previous waterfall step.

java.util.Map<java.lang.String,java.lang.Object> getValues()

Gets a dictionary of values which will be persisted across all waterfall actions.

java.util.concurrent.CompletableFuture<DialogTurnResult> next(Object result)

Skips to the next step of the waterfall.

Methods inherited from DialogContext

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

WaterfallStepContext

public WaterfallStepContext(WaterfallDialog parentWaterfall, DialogContext dc, Object options, Map values, int index, DialogReason reason, Object result)

Initializes a new instance of the WaterfallStepContext class.

Parameters:

parentWaterfall - The parent of the waterfall dialog.
dc - The dialog's context.
options - Any options to call the waterfall dialog with.
values - A dictionary of values which will be persisted across all waterfall steps.
index - The index of the current waterfall to execute.
reason - The reason the waterfall step is being executed.
result - Results returned by a dialog called in the previous waterfall step.

Method Details

getIndex

public int getIndex()

Gets the index of the current waterfall step being executed.

Returns:

returns the index value;

getOptions

public Object getOptions()

Gets any options the waterfall dialog was called with.

Returns:

The options.

getReason

public DialogReason getReason()

Gets the reason the waterfall step is being executed.

Returns:

The DialogReason

getResult

public Object getResult()

Gets the result from the previous waterfall step. The result is often the return value of a child dialog that was started in the previous step of the waterfall.

Returns:

the Result value.

getValues

public Map getValues()

Gets a dictionary of values which will be persisted across all waterfall actions.

Returns:

The Dictionary of values.

next

public CompletableFuture next(Object result)

Skips to the next step of the waterfall.

Parameters:

result - Optional, result to pass to the next step of the current waterfall dialog.

Returns:

A CompletableFuture that represents the work queued to execute. In the next step of the waterfall, the result property of the waterfall step context will contain the value of the .

Applies to