Question
Capgemini
GB
Last activity: 30 Oct 2017 7:22 EDT
Cannot Load Previous Decision Results for Response Strategy
Hi,
I have configured a data flow to call a strategy in mode "Make decision and store data for later response" with the time set to 7 days.
After running it runs fines and produces results that I can see are stored in the pxDecisionData data set.
But I am now trying to capture responses in a response data flow as per the tutorial in "Implementing Adaptive Decisioning". In the response data flow I am calling a strategy with mode "capture response from previous interaction" and mapped a correct interaction ID, then mapped the flow in the Adaptive decision data set for later learnign. However no previous decision results are loaded when the strategy is run.
Running Pega v7.22. Have I misconfigured it, or is it a product bug? Either way I feel the documentation is not clear enough.
Please help :)
Thanks
Joe
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
A Dutch Bank
NL
Joe, one more thing on the checklist (maybe Pega can add this to the documentation: checklist for applying training to projects):
1. Check your class for the response stream is Concrete (not abstract) and has a key CustomerID. Without this it will not work for sure.
2. Check your TTL is long enough for your running of soap rest responses.
Troubleshooting checklixt (for those who come along and read the thread);
1. Browse your pxDecisionData (as per tutorial) and see that it looks similar.
2. Ensure the REST request contains the right values matching those of 1 above. Namely Behaviour, InteractionID, CustomerID (they can have these names on the request, similar to tutorial names) they will be used (at least InteractionID) when you configure the data flow strategy caller component.
Capgemini
GB
I should also note that I can see the interaction in the pxDecisionData set when I run it manually in "Browse" mode. But if I use browse by keys and paste in the interaction ID it does not return any results, even though the entry with that id is there.
A Dutch Bank
NL
Hi Joe,
As confirmed with your colleague. You are running Pega 7.22 and your tutorial is: https://academy.pega.com/library/72/implementing-adaptive-decisioning
Did you check whether your time to live (TTL) on the first call to the first strategy for making decisions is long enough so that when you run the responses the decision data is still stored?
I will investigate it further in the mean time.
Regards, Andre' Cesta
A Dutch Bank
NL
Hi Joe,
Is your response flow for real time REST responses? In your response dataflow, do you click run data data-flow, and then click the "Activate" button? If so what are the numbers showing on the dataflow Activate screen. What are these numbers after Activate is clicked and a few REST responses are sent? How far does the flow get into the processing nodes? Can you take a screenshot?
If you are running batch data flows. Are you able to show how far the flow gets in the dataflow grapht via a prinstscreen/screenshot?
I attach my printscreen trying to reproduce this problem. You can see the flow gets with 1 flow unit all the way to the input of Strategy caller. The strategy caller outputs 0 flow units. Is this what you are experiencing? Does it match your problem?
Regards, Andre' Cesta
A Dutch Bank
NL
So I have tried the exercises from the training you mentioned: https://academy.pega.com/library/72/implementing-adaptive-decisioning
The exercises work perfectly well on the Pega training VM, the response strategy outputs rows and the adaptive model learning takes place. But when it comes to applying "delayed learning" techniques from this tutorial on my own Pega 7.22 install it does not work. I am not sure if my problem on my Pega 7.22 environment is the same as yours (if I am reproducing your problem or I am getting a different one). My problem is that (see previous post from me above), my problem is that the response strategy outputs zero rows as per picture attached.
I can make the training VM strategy output zero rows.... all I need to do is enter an invalid interaction id in the response. It fails silently like the attached picture data (1 record enters the strategy data flow node and 0 records get out). But notice that the "delayed" learning is failing like this, but the interaction id like you point out does exist in the pxDecisionData dataset.
So I hope somebody from Pega sees this and tells us what patch, configuration or button needs to be pressed in our Pega environments so that the training techniques will work.
Capgemini
GB
Hi Andre,
Thanks a lot for looking into this.
The issue you have run into is the same as mine. When I run the pxDecisionResults data set in browse mode the result is there, but it is not returned in the response strategy when I run the response data flow, even though I have provided the correct interaction id to lookup.
I noticed that when running the data set with browse by keys mode it will not return results with just the interaction id, but also requires the subject id. There is no explicit way to provide the subject id when calling the response strategy so either it is a bug or we have missed some config setting.
I will ask somebody on my end to ask his contacts in Pega.
Thanks again
Joe
A Dutch Bank
NL
So the chances are less that both you and me did something wrong. My environment where I reproduced your problem is a Pega 7.22 running on Tomcat and Postgres. The Pega 7.22 comes from this distribution without patches: 115290_Pega722_base.zip.
Pegasystems Inc.
NL
Hi Joe,
Here are some links that may be of help:
- https://docs-previous.pega.com/decision-management-reference-materials/troubleshooting-decision-management-components
- PDN Tutorial: https://docs-previous.pega.com/decision-management-reference-materials/tutorial-creating-decision-strategies-headless-decisioning-scenario
- PDN Tutorial: https://pdn.pega.com/tutorial-building-headless-decisioning-scenario-data-flows
- https://mesh.pega.com/thread/56991
For an example of a response data flow in DMSample: DMOrg-DMSample-Int-Response-ResponseFlow
Ivar
and to be complete, this is the academy video you mentioned:
Academy: Implementing Adaptive Decisioning | Pega Academy
Capgemini
GB
Hi All,
Thank you for your help.
My application is configured exactly as in the included examples/tutorials. In the response data flow I have mapped a correct interaction ID from the primary page, the strategy is configured with "capture response from by interaction id" but no previous strategy results are loaded into the strategy at runtime for the outcome to be set.
I have a feeling that the subject id is the problem but none of the documentation mentions how this is supposed to be used and there is nowhere to input it. I have also tried mapping the subject id to a property pxSubjectID on the primary page of the response data flow at runtime and it's still not working (that appears to be what is happening in this turorial https://docs-previous.pega.com/building-headless-decisioning-scenario-data-flows-pega-718-pega-721).
Thanks
Joe
Pegasystems Inc.
NL
Hi Joe,
pySubjectID in the response flow has to match the one stored in the pxDecisionResults.
pxInteractionID and pySubjectID are used to retrieve the previously stored ADM inputs. Technically, these are the keys into the pxDecisionResults dataset.
Hi Joe,
pySubjectID in the response flow has to match the one stored in the pxDecisionResults.
pxInteractionID and pySubjectID are used to retrieve the previously stored ADM inputs. Technically, these are the keys into the pxDecisionResults dataset.
pySubjectID usually is the customer ID.
Ivar
Capgemini
GB
So is there an implicit step in the response data flow when we set the mode to "capture previous by int ID" that will check the pySubjectID of the primary page?
None of this is mentioned in the documentation.
Pegasystems Inc.
NL
Setting the mode of the Strategy shape to "Capture response for previous decision by Decision ID" (NB the label may be different in different product versions) indeed makes DSM retrieve the previous decisions for you by subject + interaction ID. There is another mode that fetches them by just subject ID.
As far as I could see (I scanned the referenced materials) this is what is also mentioned in there. Do you have any suggestions what could help to make this clearer? We'd be happy to convey this to the documentation teams.
Thx
Otto
Capgemini
GB
Accepted Solution
A Dutch Bank
NL
Joe, one more thing on the checklist (maybe Pega can add this to the documentation: checklist for applying training to projects):
1. Check your class for the response stream is Concrete (not abstract) and has a key CustomerID. Without this it will not work for sure.
2. Check your TTL is long enough for your running of soap rest responses.
Troubleshooting checklixt (for those who come along and read the thread);
1. Browse your pxDecisionData (as per tutorial) and see that it looks similar.
2. Ensure the REST request contains the right values matching those of 1 above. Namely Behaviour, InteractionID, CustomerID (they can have these names on the request, similar to tutorial names) they will be used (at least InteractionID) when you configure the data flow strategy caller component.
Capgemini
GB
Thanks Andre,
The customer id mapping should be specifically mentioned in the documentation in my opinion, since decisioning is not tied to customers and this ID his a mandatory field.
I haven't verified if it works on my end yet, have a meeting tomorrow about it.
Thanks
Joe
Pegasystems Inc.
NL
Hi Joe
> The customer id mapping should be specifically mentioned in the documentation in my opinion, since decisioning is not tied to customers and this ID his a mandatory field.
This is definitely a good point. We'll look at how to make this clearer - especially for use cases where there is no obvious Customer ID.
Thanks for the feedback!
Otto