Bixby Developer Center

References

related-values

optionalvalue optional

Declares how the system treats values of an input planned from different paths in a plan related to the same concept node type. Use only on iterable inputs. The related-values types are MayRelate and MustNotRelate.

action (<name>) {
collect {
input (<name>) {
related-values (<type>)
}
}
}

MayRelate

A restriction that allows multiple values for each distinct plan node source. Used for search use cases such as "Find Virgin and United flights" where Virgin can match multiple carriers. Use only on iterable inputs.

action (FindAirplaneModelByCode) {
type (Search)
description (Find an airplane model by code and carrier)
collect {
input (code) {
type (AirplaneModelCode)
min(Required)
}
input (carrier) {
type (viv.air.Carrier)
min (Required)
// if user says "Virgin", for example, this might match more than one carrier,
// so iterate over all matches and combine results
iterable
related-values (MayRelate)
}
}
output (AirplaneModel)
}

MustNotRelate

A restriction that disallows multiple values to be related to the same plan node source, in other words requires a single value for each distinct path in the plan. Use to support transactional use cases such as "Send email to John and David" where John and David should each be resolved to a single distinct value of the same type. If violated, the system will prompt. Use only on iterable inputs.

action (FindEvents) {
type (Search)
collect {
input (performer) {
// Enforce that the Many performers incoming to FindEvents each come
// from a distinct path. So if we search for 'Find events by A and B',
// then it will allow at most 1 performer A and at most 1 performer B,
related-values (MustNotRelate)
type (Performer)
min (Optional)
max (Many)
}
input (dateTimeInterval) {
type (viv.time.DateTimeInterval)
}
input (eventName) {
type (EventName)
}
}
output (EventSet)
}