
Creating a Case from Kafka data
4 Tasks
45 mins
Pega Platform '24.2
Advanced
Pega Platform '24.2
English
Scenario
MDC plans to grow its business significantly by partnering with other subsidiaries. To accomplish this, MDC wants to enable asynchronous registrations with higher throughput, while ensuring that the systems remain loosely connected.
The following table provides the credentials you need to complete the challenge:
Role | User name | Password |
---|---|---|
Admin | admin@deliveryservice | rules |
Detailed Tasks
1 Identify design options
There are two options to implement the given requirement:
- Option 1: Use the external Kafka service to read the message and create a Case asynchronously.
- Option 2: Use a message queue to read the message and create a Case asynchronously.
2 Evaluate design options
The following table outlines the pros and cons of two design options for implementing the given requirement:
Design | Pros | Cons |
---|---|---|
External Kafka |
|
|
Message queue |
|
|
3 Recommend the best design option
Because MDC requires a loosely coupled, asynchronous integration with higher throughput, Kafka is more efficient.
4 Implement solution details
- In the Pega Platform instance for the challenge, enter the following credentials:
- In the User name field, enter admin@deliveryservice.
- In the Password field, enter rules.
- In the navigation pane of Dev Studio, click Configure > Decisioning > Infrastructure > Stream, and then copy the IP address of the Kafka instance.
- In the navigation pane of Dev Studio, click Records > SysAdmin > Create > Kafka to establish a connection with Kafka service.
- On the Connection tab, add host details with the IP address that you captured in step 2, and then save the Rule form.
- In the navigation pane of Dev Studio, click Records > Data Model > Data Set, and then create a Data Set record configuration that reads the messages from Kafka:
- In the Label field, enter Create Partner From Kafka.
- In the Type list, select Kafka.
- In the Context list, select Delivery Service.
- In the Apply to field, enter MDC-DS-Work-Partner.
- Click Create and open.
- Configure the connection details:
- In the Kafka configuration instance field, enter or select ConnectKafka.
- In the Define a new topic or select one from the cluster section, select Create new.
- In the Key field, enter or select BusinessPartnerId.
- Click Save.
- In the navigation pane of Dev Studio, click Records > Data Model > Data Flow, and then create a Data Flow record to read the messages from Kafka that uses the Data Set and outputs the messages to the Create Case:
- In the Label field, enter Create Partner Case.
- In the Context list, select Delivery Service.
- In the Apply to field, enter MDC-DS-Work-Partner.
- Click Create and open.
- Click Save.
- Configure the source configurations for CreatePartnerCase Data Flow Rule:
- In the Import data from section, in the Source list, select Data set.
- In the Data set field, enter or select CreatePartnerFromKafka.
- In the Read options section, select Only read new records.
- Click Submit.
- Click Save.
- Configure the destination configurations for CreatePartnerCase Data Flow Rule:
- In the Output data to section, in the Destination list, select Case.
- In the Case list, select Partner.
- In the Add mapping section, in Set field, enter or select BusinessPartner, and then in the equal to field, enter or select BusinessPartner.
- Click Submit, and then click Save.
- Run the CreatePartnerCase Data Flow Rule by clicking Actions > Run, and then click Run.
Note: In the Pega lab environment and the virtual machines provided in the introductory part of this course, only background nodes are accessible. You should choose a background node rather than a batch node. However, in a real-world setting, it's necessary to utilize a batch node.
The system begins processing the Data Flow Run:
Confirm your work
- Click Actions > Run to push a text message into Kafka to create the Partner Case that uses the PublishMessageToKafka Rule.
- Navigate to the Data Flow run instance to view the statistics.
- In the navigation pane of Dev Studio, click App > Partner to view or open the Partner Case instances.
- Confirm that you can see the details of the Partner Case.
Available in the following missions:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?