An input value to the plan created by an intent block.
A value can assign an explicit concept and value to the intent, as in this example from the refreshing content sample capsule:
action (CheckRideShareStatus) {
type (Calculation)
collect {
input (activity) {
type (Activity)
min (Required)
default-init {
intent {
goal: Activity
value: Countdown (20)
}
}
}
}
output (Activity)
}Frequently, you'll use a expression for the value rather than an explicit concept. In this example from the audio sample capsule, meowToPlay is a concept that specifies the sound to play; this intent passes the value of that concept to the PlayAudio action.
computed-input (meow) {
description (By passing in the AudioInfo object to the PlayAudio action, we ask the client to play our sound.)
type (audioPlayer.Result)
compute {
intent {
goal: audioPlayer.PlayAudio
value: $expr(meowToPlay)
}
}
hidden
}
You can also cast concept values to different types by explicitly declaring them. This example casts a viv.time.StartDate to a property in viv.time.dateTimeInterval.
match: viv.time.DateTimeInterval(dateTimeInterval)
intent {
goal: viv.time.DateInterval
value: viv.time.DateInterval {
start:
viv.time.StartDate {
$expr(dateTimeInterval.start.date)
}
}
}It's also possible to use an intent to assign explicit values to properties within structure concepts:
intent {
goal: viv.time.DateInterval
value: viv.time.DateInterval {
start:
viv.time.StartDate {
year: viv.time.Year(2010)
month: viv.time.Month(11)
day: viv.time.Day(20)
}
}
}| goal optional | Specifies the model used as a plan's target |
| goal-set optional | A collection of goals |
| route optional | Specify a node the planner must route its execution path through when creating the plan for an intent |
| subplan optional | Specifies a plan intent embedded inside another |
| value optional | An input value to the plan created by an intent block |
| value-set optional | Specifies a collection of values to be used as inputs to the plan created by an intent block |