Hey,
I have a rule base which infers the existence of a bunch of entities - no issues there. Now I am adding two extra inferred attributes that will exist for each inferred entity instance, only I can't seem to get this attribute to contain different values based on rules.
Basically what I have is:
the policy required |
"Policy 1" | policy 1 is required |
"Policy 2" | policy 2 is required |
the price of the policy required |
"500" | is policy 1 |
"200" | is policy 2 |
"100" | otherwise |
the duration of the policy required |
"1 Year" | is policy 1 |
"2 Years" | is policy 2 |
"6 Months" | otherwise |
the price = InstanceValueIf(the policy required, the price of the policy required, true)
the duration = InstanceValueIf(the policy required, the duration of the policy required, true)
is policy 1 if
//DONT KNOW WHAT TO DO HERE
is policy 2 if
//DONT KNOW WHAT TO DO HERE
I basically need something in the commented area for each "is policy X if" rule which says something like: current instance = "policy 1". I've tried doing some other logic in these conclusions but the attribute ends up with the same value for all entities. I used the ‘InferredServiceDelta’ example project as a guide because it does something similar, but in that case it sets a different attribute name per inferred instance. I can’t do this because later on a web service consumes it and loops over instances. If the attribute name is dependent on the instance name it will become too tightly coupled and lose its generic characteristics.
Can anyone shed some light here?
Thanks