Question
Reference Adaptive Model propensity in strategy via java function
Hi Community,
I am looking at ways to reference adaptive model propensity using a java function, from within a strategy. The reason is to have models created but not connected in the strategy, instead to call up and use the propensity result for further use. This way the models can be switched, say using a decision data attribute depending upon the proposition being served up.
I have looked at Activity: Example call to pxGetPredictionCase Pega-DecisionEngine:07-10-33, and understand the call to the pxGetPredictionCase activity. The first step in this example call is to "Create inputs page for model in DMSample initial data" step which creates pyModelIdentifiers & pySerializedADMInputs with dummy data (for inputsPageName, see further)
I want to have these referred from the actual model. As an example, an adaptive model called ADM001 has been created with 60 predictors.
pxGetPredictionCase has 4 parameters: ruleName, appliesTo, inputsPageName & resultsPageName
Creating the inputs page is tricky and I would appreciate any help I can get.
I have had people suggesting to drop this approach but for the purpose of doing something differently I would like to attempt it. Happy to hear thoughts (& solutions) for both sides though.
@SwapnilK7859
Hi Swapnil,
Hope you're fine!
I may not understand your question 100%, but it's OK to put an adaptive model shape in a strategy and then not connect it. You can refer to the propensity it returns where needed from any other component (for example in an expression) or save the propensity in a strategy property for further use.
But perhaps you can expand on the details of the further use and also the reason why you wouldn't want to connect?
Thanks,
Ivar