Wrapper effect that groups an ordered list of other effects. By default, Bixby
would execute only the first qualifying effect it encounters in a control-flow.
However, with ordered-effects it is possible to execute multiple effects at
once. All the effects defined inside will run sequentially, in the order
declared. Note that the ordered-effects cannot contain conditionals or other
ordered-effects.
Most commonly, ordered-effects is used to drop multiple inputs during
relaxation. In this example, FindPlanets attempts to find planets fulfilling a number of user inputs. However, there might be no results that satisfy all the inputs at once. Instead of going to the NoResults state, the action uses drop effects to relax the search parameters. This example drops two inputs at once by wrapping them in an ordered-effects block. Grouping drop effects together like this reduces the number of relaxation passes and gets to results faster,
action (FindPlanets) {
type (Search)
collect {
input (name) {
type (PlanetName)
min (Optional) max (One)
}
input (color) {
type (PlanetColor)
min (Optional) max (One)
}
input (sortType) {
type (PlanetSortType)
min (Optional) max (One)
}
}
output (ThisPlanet) {
on-empty {
ordered-effects {
drop (color)
drop (name)
}
}
}
}
| drop optional | Effect that drops a specified input from an action |
| flag-as-off-topic optional | Effect that flags the current utterance as off-topic |
| halt optional | Effect that halts execution after a dialog message event |
| prompt optional | Effect that prompts the user for an input |
| replace optional | Replace an existing input value with a new one |
| replan optional | Effect that re-plans to a new intent, after an optional dialog event |
| unlock optional | Pauses execution if device is locked and informs users they need to unlock their device to continue |