Question
1
Replies
141
Views
Posted: July 22, 2020
Last activity: July 24, 2020
Solved
Stream Data Set REST service.
Hello All,
We are working con Real Time Events. Based on Pega Marketing 8.4 Documentation we are trying to use the rest service noted in the integration section in the OOTB Stream Data Set CDHEventSource. When we use postman with Basic Authentication to do the POST request we are getting time out. Does anyone know how to troubleshoot this issue or fix it?.
Thanks,
Jorge
Hi Jorge,
CDH events in 8.4 has 2 components (runtime and entry point)
Runtime:
Configuring the runtime through stream data-set (CDHEventSource) with the real-time data flow (ProcessFromEventSource) is well documented under the section user guide: "Triggering an Event".
Entry point: (we have some mixed set of documents on this, and we are streamlining it better on the documentation front) But, here is the summary of choices:
For sending events into the Pega CDH you have 4 options:
1. SOAP – We have an example for SOAP entry point in our documentation and we ship the service entry point too. Check the shipped OOTB rule (Rule-Service-SOAP) --> PegaMKTDataMktEvent --> Services --> HandleMktEvents For detailed documentation check the user guide under the section : "Triggering an Event with the SOAP service" The documentation says this is deprecated, but that is not the case, we are fixing the documentation.
2. HTTP – We ship OOTB, but missed the documentation (we are fixing this in the next release), but not hard to use. Even the event pay load data that are nested structures could be passed as XML Check the shipped OOTB rule (Rule-Service-HTTP) --> PegaMKTDataMktEvent --> Services --> HandleMktEvents
3. REST – You can define one in your ruleset layer and write to the Stream data-set similar to how the HTTP or SOAP service OOTB does it. For an example, please check the entry point activity HandleHTTPEvent under PegaMKT-Data-Event
(The option what you are referring to as the "REST" entry point that is shown in the stream data-set CDHEventSource is not a recommended way of sending events. If you want to use REST please use you own REST service entry point and send the payload like HTTP and SOAP to the Stream data-set.)
4. Kafka/Stream direct injection – If you are calling the events within the Pega cluster, then this would perform the best as an entry point. This is basically you can write through an activity directly to the Stream data-set with the Page payload. This won't work if you are calling the event from a client that does not run Pega.
So in summary consider SOAP/HTTP/REST if the calling from the client is outside the cluster that is not running Pega, and option 4 Kafka/Stream if it is direct injection within the cluster (some customers use this in combination with Event Strategy Manager (ESM)
If you are planning to use the OOTB entry points of SOAP or HTTP with the stream runtime, please also configure the dynamic system settings DSS (you will have to create one). This DSS is to send the events to the stream runtime, otherwise it would send to the older agent based runtime which is deprecated for performance reasons. The DSS should be like this: Ruleset name : PegaMKT-Engine DSS name : MKTKafkaEvents value : true
On your other question on debugging tools - all the Pega service entry points including HTTP/SOAP/REST can be traced directly if the request is coming in (Open the service rule type for example HandleMktEvent of type Rule-Service-HTTP and click on the Action-->Trace.
If the server is not receiving any requests and getting blocked by other networking issues, the tool Postman what you are using has many debugging options. Please check the below link for more information : https://learning.postman.com/docs/sending-requests/troubleshooting-api-requests/
Hope the above helps, if not let us know. If you need much more detailed information, please create a Pega support request and we can get into calls if need be.
Thanks, Sriram