When defining an attribute as expression, the Policy Server reports error:
Fatal: Failed to execute CreateAttributeMappingEvent. ERROR MESSAGE: SmApiWrappedException: The first clause of a conditional expression must be boolean (not <string>).
The attribute mapping in the User Directory is configured that way:
User Directories › Modify User Directory: sps › Modify User Directory: sps › Create Attribute Mapping
User Directory:
Attribute Mapping List
|-------------------+-----------------------------|
| Attribute mapping | expression |
| Name | <expression_name> |
| Definition | (<variable> ? "yes" : "no") |
The configuration of the attribute being an expression, an operator should be in use like the following (1)(2):
<variable> ~= "<value>" ? "yes" : "no"
In the following sample, the operator is "~=".
(SM_USERGROUPS) ~= "cn=<group>,dc=example,dc=com" ? "Yes" : "NO"
This means if the value of SM_USERGROUPS contains
"cn=<group>,dc=example,dc=com"
If true, it should return the string "Yes", and if false, it should return "NO".
The expression should be written that way to fix the issue:
User Directories › Modify User Directory: sps › Modify User Directory: sps › Create Attribute Mapping
User Directory:
Attribute Mapping List
|-------------------+-----------------------------------------|
| Attribute mapping | expression |
| Name | <expression_name> |
| Definition | <variable> ~= "<value>" ? "yes" : "no" |