Conditional logic
Conditional logic allows for resources only to be executed if a given condition results in a pass. Multiple conditions could be nested which each other.
flow "IsAdmin" {
input "org.Input" {}
if "{{ input:is_admin }}" {
resource "query" {
request "proto.Service" "ThrowError" {}
}
}
output "org.Output" {}
}
Complex conditions
Complex conditions could be defined with multiple operators and using multiple resources.
if "({{ input:has_property }} && {{ input:age }} > 18) && {{ input:is_admin }}" {
resource "query" {
request "proto.Service" "ThrowError" {}
}
}
Last updated