this part was changed a bit. Now "argument" field is an array and it can contain as much items as operator needs. For example, "greaterThanOrEqual" PolicyOperator could have structure like this:
This operator compares AvailableDownloadBandwidth variable with number 100 000 000
In similar manner other operators could be created.
Hrvatski Telekom d.d.
Original Message:
Sent: Jul 17, 2023 09:45
From: Anton Tsapko
Subject: Is it possible to use two or more VARIABLEs in a PolicyStatement (PolicyCondition)?
@Ivan Sokol ,
I found some time to have a look at the new design and have some questions considering it:
- How is it possible to know which variable is the "left" and which is the "right one? Since a "*" wildcard is used in the model, I assume I can chose the names on my own behalf. In that case the ordering is only known to me. JSON could return alphabetical order in worst case. Or am I supposed to name them literally "left" and "right". If so, why not design the model that way?
.
- How would a statement look like with one operator and 3 variables then? Should not the model be limited to 2? You write: "PolicyOperator defines variables (1 or many) in argument map".
Best Regards
Anton
P.S. It would be really great the future documentation of the policy management API would contain some examples of price policies administration. ( I could supply some exmaples if needed).
------------------------------
Anton Tsapko
conology
------------------------------
Original Message:
Sent: Jul 04, 2023 01:35
From: Ivan Sokol
Subject: Is it possible to use two or more VARIABLEs in a PolicyStatement (PolicyCondition)?
Hi Anton,
let me reply to you by refereeing to TMF723 swagger, as that is for me most accurate documentation.

First, one PolicyCondition can be atomic or composite. If it is composite, it needs to have condition list populated together with conditionCombinationLogic property. This is how you combine multiple conditions.
If condition is atomic, then statement property must be populated. PolicyStatement can be PolicyExpression or PolicyOperator. PolicyOperator defines variables (1 or many) in argument map

There you can name your arguments as you see fit. For example, you can name your operation „greaterThan" and then in argument property you put 2 arguments: „left" and „right". Then those arguments would point to the PolicyVariable where you can define from where „left" and „right" arguments are resolved.
To answer your question, one PolicyStatement can have many arguments depending on a statement type
Also, to reply to this
Not possible:
- somePolicyStatement: Variable1 [total_sum_bundle1] Operator [<] policyStatement2
Correct, this is not possible in this manner, as SID model didn't envisioned it like this. But it is possible if you involve PolicyActions like this:
- you first execute Policy (not Statement, but Policy) that contains policyStatement2. Then you set named variable by using PolicyAction on that Policy.
- then you execute second Policy that contains somePolicyStatement and refers to named variable set in first step
- you combine these 2 policies in PolicySet, so that they are executed sequentially
Kind Regards
Ivan Sokol
------------------------------
Ivan Sokol
Hrvatski Telekom d.d.
Original Message:
Sent: Jul 02, 2023 10:36
From: Anton Tsapko
Subject: Is it possible to use two or more VARIABLEs in a PolicyStatement (PolicyCondition)?
@Jonathan Goldberg , I am glad you replied.
My first thought was the same - to create a nested statement for each variable. But as I understand the definitions, the "grammar" chosen at the moment does not allow policyStatements to have nested policyStatements, only variables and values (literals). Just as it does not allow two variables to be used within one policyStatement. So the grammar only allows simple logic like: [anyOf, allOf, oneOf, none: policyCondition1, policyCondition2]. Unfortunatly "Value" in a policyStatement cannot point to another "policyStatement" or condition for nesting. This is an important limitation.
- policyStatement1: Variable1 [total_sum_bundle1] Operator [<] ValueX [10.000]
- policyStatement2: Variable2 [total_sum_bundle2] Operator [<] ValueY [5.000]
.
Not possible:
- somePolicyStatement: Variable1 [total_sum_bundle1] Operator [<] policyStatement2
.
What would be proper way to reach @Ivan Sokol ? Would that be by E-Mail or rather using this forum?
Best Regards
Anton
------------------------------
Anton Tsapko
conology
Original Message:
Sent: Jul 02, 2023 01:26
From: Jonathan Goldberg
Subject: Is it possible to use two or more VARIABLEs in a PolicyStatement (PolicyCondition)?
Hi Anton
Probably you would create a statement for each variable, and then combine the statements. I would suggest to check with @Ivan Sokol who is the lead for the new Policy API.
Hope it helps
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.