Connectors and services
Applications often establish connections with external systems to exchange data needed for users to complete assigned Tasks. These connections use standard frameworks to exchange information between systems, identify required inputs, and define the response's format. For example, a Pega Platform™ application providing automobile insurance quotes can submit a driver's license number to an external data source hosted by the Department of Motor Vehicles to obtain the driving history of a customer to assess risk and price an insurance policy.
A connection between systems consists of two parts: a connector (sometimes referred to as a service connector) to initiate a request, and a service to fulfill the request. The connector on the requesting system establishes a link to a service on the responding system to exchange data between the two systems.
Connectors
A connector defines an outbound request for information based on metadata that is published for the data source. Connectors establish a connection to an external system by using an agreed-upon framework to pass data, such as Simple Object Access Protocol (SOAP) or Representational State Transfer (REST). Connectors pass application data to an external data source through required or optional parameters and parse the response to map source data to the data structure used in the application.
Consider the process of applying for a loan with a Pega Platform application. A customer creates a Case to apply for a loan. The loan management application processes the Case and requests the customer's credit history from a credit agency. The loan management application uses a connector to provide the taxpayer ID and any other identifying information to a service hosted by the credit agency. The service provides a response that includes a credit score and an array that lists active and inactive lines of credit. The connector maps some or all of the response data to the data structure used by the Case. For example, the connector can map the credit score to a data element and ignore the credit history.
In Pega Platform, you implement a connector with a connector Rule. When you use a connector to request information from a data source, you can call the connector from a Data Page. When you use a connector to send information to a data source (for example, updating the vehicle status when a customer reserves a rental vehicle), you can call the connector from a Save Data Page Step.
Match the numbers in the following image to learn more about how a connector submits a request to a service and processes the response:
1. Map data to the integration: If necessary, configure a Data Transform to map data from the Clipboard Pages for the application to the Clipboard Page used by the connector. When creating an external data source for a Data Type, this configuration is managed automatically.
2. Invoke the connector: Run the connector to send the request to the external data source.
3. Map response back to the application: If necessary, configure a Data Transform to map data from the Clipboard Page used by the connector to the Clipboard Pages for the application. When creating an external data source for a Data Type, this configuration is managed automatically.
4. Initialize the connector: Pega Platform initializes the connector and opens a connection to the server port assigned to outbound communications.
5. Map outbound data: Map data from the Data Model for the connector to the Data Model used by the service. For example, copy the value of the property TaxpayerID to the ID parameter required by the service.
6. Invoke the service: Submit the request to the service on the external system and wait for a response.
7. Map inbound data: Map data from the service response to the Data Model for the connector. For example, copy the credit score and records for each line of credit to properties used on Pega Platform.
8. Complete the connection: Close the connection to the server port.
Supported connectors
Pega provides connectors for a wide range of industry-standard protocols and standards. Standard connectors include Cassandra, CMIS, HBase, JMS, MQ, REST, SAP, SOAP, and SQL.
Check your knowledge with the following interaction:
Services
A service processes an inbound request and responds to the requesting system. Services define parameters for passing data needed to fulfill the request and the structure and format of the response, such as eXtensible Markup Language (XML) or JavaScript Object Notation (JSON). The requesting system parses the response to map the returned data to its data structure.
Consider an order management application for a wholesaler that is implemented in Pega Platform. A retailer configures their inventory management application to access a service provided by the wholesaler to place an order for items that fall below a specified inventory threshold. Each week, the inventory management system sends a list of items and quantities to order. The service provides a response that includes an order total, confirmation number, and expected date and time of delivery.
In Pega Platform, you use a service Rule to configure a service. A listener typically calls service Rules. The listener runs in the background on the server, waiting for requests. When a request arrives, the listener analyzes the request and calls the service to process the request and return a response.
Match the numbers in the following image to learn more about how a service processes a request and provides a response to the requesting system:
1. Inbound request received: A listener detects the inbound request and passes the request to the appropriate service. If necessary, the listener performs any authentication required to access the service.
2. Service processing: The service processes the request and generates a response to return to the requesting system.
3. System returns a response: The service activity completes processing and returns control to the service, which returns the generated response to the requesting system.
4. Map inbound data: The service maps incoming parameters to the Data Model for the Pega Platform application. For example, the inbound parameter ItemID is mapped to the application property SKU to identify an item in an order.
5. Request processing: The service activity processes the request. Depending on the service configuration, the service activity may create a Case or modify a data instance. For example, the service creates a Case to process an order from a retailer.
6. Map outbound data: The service maps the Data Model for the Pega Platform application to any defined outbound parameters, generating the response to the request. For example, a service maps the Case ID, order total, and estimated delivery date from the generated Case to the outbound parameters OrderID, OrderTotal, and DeliveryDate to create the response to the inbound request.
Supported services
Pega provides services for a wide range of industry-standard protocols and standards, including File, JMS, MQ, REST, and SOAP.
Check your knowledge with the following interaction:
This Topic is available in the following Module:
¿Quiere ayudarnos a mejorar este contenido?