DT DeciosnForRecommendation1 |
|||
If |
If |
Conclusion |
|
Var1 |
Var2 |
Eligibility for X |
|
A |
B |
Eligible for X1, X2 |
|
DT DeciosnForRecommendation2 |
|||
If |
If |
Conclusion |
|
Var3 |
Var4 |
Eligibility for Y |
|
C |
D |
Eligible for Y1, Y2 |
|
DecisionTable CustomerPreventStrategyDecisionTable |
|
||
Action |
|
||
Recommended Prevent Strategies |
|
||
::= ${Eligibility for X} + "__ "+$Eligibility for Y} |
|
||
Glossary glossary |
||
Variable |
Business Concept |
Attribute |
Var1 |
Customer |
var1 |
Var2 |
var2 |
|
Var3 |
var3 |
|
Var4 |
var4 |
|
Var5 |
var5 |
|
Var6 |
var6 |
|
Eligibility for X |
PreventStrategy |
eligibilityForX |
Eligibility for Y |
eligibilityForY |
|
Recommended Prevent Strategies |
Response |
recommendedPreventStrategies |
Datatype PreventStrategy |
||
String |
eligibilityForX |
|
String |
eligibilityForY |
|
Data PreventStrategy preventStrategy |
||
eligibilityForX |
eligibilityForY |
|
Eligibility for X |
Eligibility for Y |
|
? |
? |
DecisionObject decisionObjects |
|
Business Concept |
Business Object |
Customer |
:= decision.get("Customer") |
Response |
:= decision.get("PreventResponse") |
PreventStrategy |
:= preventStrategy[0] |
In Java side:
Response preventResponse = new Response();
decision.put("Customer", customer);
decision.put("PreventResponse", preventResponse);
decision.execute();
It is deployed using springBoot.
Now the scenario is
1st call: Customer attributes does not satisfy any Decision Table - it is returning-- ?__? which is correct.
2nd call: Customer attribute satisfy 1st DT, response: Eligible for X1, X2__? which is correct.
3rd call: Customer attributes does not satisfy any Decision Table - it is returning-- Eligible for X1, X2__? which is wrong.
So for all consecutive calls it is returning same.
Another scenario:
1st call: Customer attribute satisfy 1st DT, response: Eligible for X1, X2__? which is correct.
2nd call: Customer attributes does not satisfy any Decision Table - it is returning-- Eligible for X1, X2__? which is wrong.
I tried removing table Data PreventStrategy and passing preventStrategy (instead of preventStrategy[0]) in BusinessObject table but then getting
Caused by: org.openl.syntax.SyntaxErrorException: Error: Field not found: preventStrategy
Invalid Code Fragment:
=========================================
preventStrategy
^^^^^^^^^^^^^^^
It will be really helpful if you can point the mistake.
Regards
Indranil