Extends input cardinality requirements to a group of inputs. Input groups can be nested and input group cardinality is slightly different than input cardinality. See the input
reference page for further details on shared keys.
The FindCountry
action searches for a country given the two letter country code (such as "US") or the three letter country code (such as "USA"). The system will prompt
for a countryCode
value if neither code is provided.
action (FindCountry) {
description ("Search for a country given the two letter or three letter country code")
type (Search)
collect {
// require a postal code or a search region or both
input-group (countryCode) {
// require at least either a two letter country code (for example, 'US') or a three letter country code (for example, 'USA')
requires (OneOf)
collect {
input (two_letter_code) {
type (ISOCountryCode2)
min (Optional)
}
input (three_letter_code) {
type (ISOCountryCode3)
min (Optional)
}
}
}
}
output (Country)
}
Match patterns can refer to input groups with an ActionName~InputGroupname
notation:
dialog (Elicitation) {
match {
viv.hotel.FindHotelsWithAvailability~checkOutOrDuration {
to-input: viv.hotel.FindHotelsWithAvailability (action)
}
}
template ("When will you check out?")
}
Input groups can be nested within other input groups.
requires required | Specifies the cardinality constraint of the group: OneOf: Requires exactly one of the input-group members to be present |
collect optional | Specifies zero, one, or more inputs to be evaluated before executing the action |
default-select optional | Enables selection rules in your action using the with-rule key and selection learning with the with-learning key |
description optional | Adds text describing the input, which is useful for documenting models |
hidden optional | Hide this input from function implementations |
order optional | Defines an explicit order in which to collect the inputs |
plan-behavior optional | A behavioral mode that modifies how the planner will attempt to instantiate the input |
prompt-behavior optional | A behavioral mode that modifies how the system will prompt on the input or at a prompt during plan execution time |
validate optional | Lists validation rules for an input or variable |