Proposition filter using an strategy returns the value from penultimate component
We have a strategy that we are using in a proposition filter from the NBA Framework. When we run the strategy in standalone or as the extension point of our business group as part of the engagement policies it works as expected. When we run the same strategy as a custom criteria of the proposition filter, this is done by the NBA Desinger when we add the strategy as a condition in Engagement Policies, we are not getting the correct result.
We have noticed that the returning value for this latter case, no matter if we pick “Final Output” od “Last Component Name”, is the actions from the penultimate component in the strategy.
Our last component is a “Prioritize” component, we have tried replacing it by a filter component with pxRank==1, but got the same result so the component type is not the issue. If we replace the component or add a filter component at the end and use a hardcoded expression like @contains("MyOffer",.pyName) it returns only one result as expected, however this hard-coding is not an option for obvious reasons.
Notice that we have been doing the testing with both the auto-generated proposition filter and also creating a proposition filter manually.
May you help me with this issue. Might it be that my strategy got corrupted or there is an issue using them in the proposition filters?
The behavior of using a strategy in the Group level extension point and as a condition in Engagement Policy is very different. When using a strategy as a condition, the first thing to understand is that this strategy must use the External Input option which will feed this strategy the one action at a time to determine if this action is eligible/relevant/suitable. This means a strategy used as a condition will result in TRUE/FALSE. The screenshot you provided looks like you are trying to priority rank or pick the top action which isn't appropriate in a condition strategy. A condition strategy is considered TRUE (action is eligible) if there are >0 results returned by the strategy, if the strategy outputs <1 result then the action is considered FALSE (not eligible).
It shows a 'simple' version of a decision strategy, how it can be used as engagement strategy. I fully agree with Robis, that Prioritize component should not really be part of an enagagement strategy. Try to put prioritization logic in the prioritization formula. For more info, check out: https://academy.pega.com/module/arbitrating-between-actions/v1/in/7896
Our strategy has an external input component. I took the academy module that you recommended, the sample decision strategy from the class is used for filtering all offers except “standard card”, being the condition:“ Engagement Strategy has results for Only Standard Card”. The only difference I see between our decision strategy and the sample strategy is the complexity. In the class it is mentioned that more complex logic can be added to the decision strategy so I do not think that is the reason.
It would be helpful if you can describe what you are trying to achieve in this strategy condition. I ask because your screenshot shows a Prioritize component which doesn't make sense since the result is TRUE/FALSE based on >0 results.
Sorry for the delay SethRobinson. I miss the response email for your reply comment.
I am trying to filter the actions to provide the best of them: first I apply a predictive model and decision table rules to determine what are eligible, then run some filter rules to to remove the offers already declined or offered to the customer base on the IH, at the end most of the time I only get one result from that section of the strategy but in some cases where I can get more than one. If I get more than one I want to let only the first ranked to be returned.