Simulating the truck rating response
5 Tasks
30 mins
Scenario
When the vendor registers a truck, the Executive Manager reviews it and decides whether to approve or reject it. If approved, the City Manager must then rank the companies that provide truck services for that city.
To rank these companies, the City Manager obtains the truck rating by inputting the VIN into an external system. The average rating of all trucks from a particular company serves as the company's initial rating. It's important to simulate the external truck system rating.
Simulating this rating involves setting up a test environment that replicates the behavior of the actual external system. A mock API returns test data resembling the external system's behavior. The mock API can undergo configuration to provide varying ratings for different companies, which enables the City Manager to test the ranking process under different conditions.
After the simulation of the external truck system rating is in place, the City Manager can use the ratings obtained to rank the companies that deliver truck services for the city. The ranking can consider various factors, such as the average truck rating for each company, the number of trucks they operate, and their industry reputation.
Simulating the external truck system rating is crucial for ensuring the accuracy and reliability of the ranking process. By developing a test environment that mirrors the actual behavior of the system, the City Manager can evaluate the ranking process under different scenarios through precise and dependable data.
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
Option 1
Enable the Simulate data source checkbox on the Data Page, and then create a Data Transform to simulate the response.
Option 2
Associate a simulation activity with the rest connector.
Option 3
Create a REST service and get a rating for this service.
2 Evaluate the design options
In the following table, review the pros and cons of each design approach:
Design approach | Pros | Cons |
---|---|---|
Simulate data source |
|
|
Connector simulation activity |
|
|
Create REST service |
|
|
3 Recommend the best design option
In this scenario, simulate the data source because it is easily configurable and has multiple source options.
4 Identify required configuration tasks
- On the Data Page that invokes the connector, toggle the simulation on.
- To set the rating, update the source to a Data Transform or an activity.
5 Review the solution details
- Log in to the Pega instance for the challenge:
- In the User name field, enter admin@deliveryservice.
- In the Password field, enter rules.
- Switch to the MDC application.
- In the GTRS data type, locate the Retrieve truck rating Data Page.
- In the row for the Data Page, click More > Toggle simulation, as shown in the following figure:
- To set the truck rating and other required properties, update the source to a Data Transform or an activity.
Confirm your work
Available in the following mission:
Want to help us improve this content?