Skip to main content
This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.
LinkedIn
Copied!

How to simulate a connector (V5.5)

Summary

When you use an Integrator shape in a flow, you cannot test the flow completely until the Integrator has an external working system to connect to.

In such cases, when the external system has not yet been configured, you can use a Connector Simulator to enable the testing of flows that contain Integrator shapes. The Connector Simulator is an activity that returns values to the flow, as though they came from the actual external source. Connector Simulators can be set up for any connector type.

You can simulate the following connector types:

  • dotNet
  • EJB
  • File
  • Java
  • JMS
  • MQ
  • SOAP
  • HTTP

In the example below, a home insurance policy application uses a SOAP connector to retrieve an applicant's previous claim history. The applicant's Social Security Number (SSN) is sent to the service, and any corresponding claims are returned.

Suggested Approach

To simulate a connector:

  1. Locate the connector you would like to simulate using the Integration Slice. Click the Simulations link.
    Integration Slice

    The Connect Simulator window appears.
     
  2. Select an existing activity, or click the Open icon to create a simulation activity that will set the static properties to be used for the simulation. In this case, the simulation is called ClaimSim.
    Simulation
    Note: To ease setup of the connector simulation, create the simulation activity in the same class as the Connect rule.
  3. The connector class (InsCorp-FW-PA-Int-ClaimService in this example) contains a page property (getClaims_getClaimsreturn) which contains a page list property (claimItems). This page list property contains the properties that will be set using the connector simulator. In this example, the simulation activity is appending a set of hard-coded values to the ClaimItems pagelist.
    properties

    In the simulation activity specify the location of the properties to be simulated as the Step Page, .getClaims_getClaimsReturn.claimItems(<APPEND>) in this example. Use the Property-Set Method.
    Simulation Activity
  4. In the Connector Simulator window, select the User Session option for the ClaimSim simulator. Click Apply Changes. The simulator is now active for the logged-in user. (Alternatively, you could select Global to enable the activity for all users). You can define multiple simulation activities. A User Session simulation will override a Global simulation.
    Simulator Active

    Integration Slice
  5. When the process is run, in place of retrieved values from an external system, the values set in the simulation activity are set in the clipboard.
    Working

To disable a simulation:

  • From the Tools menu, select Tools > Integration > Ignore Connector Simulation to temporarily disable all simulations, or Tools > Integration > Clear Connector Simulation to remove all simulators. To enable an ignored simulation, click Ignore Connector Simulation again to deselect it.
    Clear
  • Alternatively, you can disable a connector from the Connector Simulator window. Click either Clear Local or Clear Global to clear the Global or User Session radio button. With no option selected, the simulator is disabled.
    Disable
Suggest Edit
Did you find this content helpful?

75% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us