According to this documentation - Encapsulated Assertions, it should be possible to define various INPUT variables as "context variables" and set them in the Parent Policy during assertion definition.
This works fine with string variables, but when trying to set an integer variable, an error is thrown.
This is a known issue in policy manager and will be fixed in the upcoming release v11.1.3, 11.2.0 later this year.
The problem does not exist when creating the Encapsulated Assertions from restman or graphman