The issue is that there is a gap in the current functionality between search/dashboards and the rules engine. We have made this nested conditional statement that I highlighted in the search/dashboard available but we have not added it to the rules engine (yet). We have work going on to merge items like this so that we have consistency across search and rules.
The above example is valid for rules that are not using a match section but if you are using aggregation in the rule (using a match section) the outcome section will require aggregation functions for the outcome variables. Because of that, below are a few examples of methods you could use with the aggregation functions.
outcome:
$if_nested_1 = max(if($process.principal.hostname = /win-adfs/, 5, 0))
$if_nested_2 = max(if($process.principal.hostname = /server/, 3, 0))
$if_nested_3 = max(if($process.principal.hostname = /win-atomic/, 1, 0))
$sum_it = $if_nested_1 + $if_nested_2 + $if_nested_3
outcome:
$if_nested = max(if($process.principal.hostname = /win-adfs/, 5, 0)) +
max(if($process.principal.hostname = /server/, 3, 0)) +
max(if($process.principal.hostname = /win-atomic/, 1, 0))