Simulating an integration
Simulating an integration
Pega uses connectors to integrate with external systems. A connector can be invoked from either a data page or an integrator activity.
If the interface definition is available, a connector can be generated using one of the connector wizards. How an integration is simulated depends on whether or not a connector is available.
If you need to simulate an external service which has not yet been defined, but you know what data the service is going to return, then simulate the data page source or integrator activity. Simulate the connector if it already exists.
Simulate a data page
In the data page, select the Simulate data source option to simulate the data source in the data page. You can simulate a data page by using a data transform, report definition, or activity. Selecting simulation disables any data source configured.
From Dev Studio, select Configure > Data Model > View external data entities to open the External Data Entities landing page and get an overview of simulated data pages in your application. Source systems marked with a green dot are production-ready. Source systems marked with an orange triangle are simulated.
Use Integration Designer in App Studio
In addition, you can view a list of simulated data pages, also called data views, from the Integration Designer. In App Studio, select the Data Explorer to open the Integration Designer. Select the Simulated icon in the system of record row to filter by the simulated data types and find all the simulated data pages quickly.
Simulate an integrator activity
If you invoke the connector from an integrator activity, you can apply a simulation data transform to populate the case with response data.
Use a data transform to define simulation data if your connector is invoked from an integrator activity. Set the simulation data directly in the case in the same way you map the response data returned from the connector.
Configure connector simulation
You can simulate a connector when the interface of the service to which you are integrating is defined and has an existing connector, but the service may still be under development or has not yet deployed.
The Connectors landing page (Configure > Integration > Connectors > Connector Definitions & Simulations) provides you with an overview of available connectors and their simulations. Connector simulations are not available out-of-the-box.
Note: Simulation is not available for SQL connectors.
Connectors are simulated using a simulation activity. The simulation activity sets the properties to be returned by the external service on the integration page used by the connector.
A connector can be simulated either for all users in the application using the Global option, or for the current user only using the User session option.
Follow these steps to enable simulation of a connector.
- Navigate to the connector you want to simulate.
- Specify the simulation activity.
- Select the scope: Global or User session.
- Apply the changes to activate the simulation.