Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Configuring Pega Platform as a Java Messaging Service receiver

Updated on April 6, 2022

You can configure Pega Platform as a message receiver client in your Java Messaging Service (JMS) model for other applications to communicate with Pega Platform.

Before you begin: Initialize and configure JMS resources in an external system outside of Pega Platform. Integration requires this external system in order to communicate through JMS messages with other applications outside of Pega Platform. For more information about Java Messaging Services, see Messaging service overview.

This task involves the following steps that take place both external to and within Pega Platform:

Java Messaging Service requisite resources and forms: receiver client
  1. Create a JMS resource:

    JMS Service forms require either the JMS resource of a JDNI server (external or internal to Pega Platform), or a resource reference. Create a JMS resource by completing the following tasks:

    Create a JMS resource by completing the following tasks:

    1. Create a JMS server.
    2. Create a JMS module.
    3. In the JMS module, create a Connection Factory, and add a queue or topic.
    Refer to your JMS provider documentation for more information on how to create JMS resources.

    To integrate JMS with Pega Platform as a receiver client you must create a JMS resource for other applications or components to communicate with Pega Platform. Pega Platform uses either a resource reference or a direct JNDI lookup to integrate with your JMS model. The types of JMS resources you can use to integrate your JMS model with Pega Platform depend on your environment. For environment restrictions for each type of compatible JMS resource, see Messaging service overview.

  2. Import the JAR file for your JMS provider into the runtime classpath for Pega Platform.

    Refer to the repository of your JMS provider in order to download the JAR files that are required to create a publisher client. Use the Import Wizard to automatically place the most recent JAR files on the runtime classpath.

    1. In the header of Dev Studio, click ConfigureApplicationDistributionImport.
    2. In the Import Wizard, select a location from which to import the JAR file you downloaded from your JMS vendor.
    3. Click Next.
    4. Confirm the details of the JAR file, then click Next.
    5. In the Code Archive page, enter the CodeSet name and the CodeSet version used by the base ruleset of your instance of Pega Platform.

      The default value is usually this CodeSet.

    6. Finish the import by clicking Next.
    7. To import all the requisite JAR files for your JMS provider into Pega Platform, repeat substeps 4b through 2e.
    8. Restart your environment to import the JAR file into the CodeSet. For Pega Cloud clients, make a request by selecting New request in My Support Portal to restart your environment.
  3. Use the Service Wizard to create the necessary rules required to integrate Pega Platform as a message receiver client.
    1. In the header of Dev Studio, click Configure ServicesService Wizard
    2. In the Service type list, select JMS, then click Next.
    3. On the Select Work Properties page, in the Case/Supporting Type drop-down list, select the case type that receives messages that you want to associate with JMS.
    4. In the Flow Type list, select the JMS listener flow type associated with the case type, and then click Next.
    5. On the Select Flow Actions page, select the action used during the Case type, and then click Next.
    6. On the Service rule data page, click the expand icon next to the service rule data.
    7. Select the properties used to receive the JMS message, then click Next.
    8. On the Select Service Resources page, enter the Ruleset name and Ruleset version for which you want to create a new Service Package and JMS listener, and then click Next.
    9. On the Configure Data Records page, in the New Service Package section, enter the details for the Service package name, its security authentication requirements, and required requestor pools.
    10. In the New Service Listener section, enter the name, model, connection factory, request and response destination name from the JMS resources that you created in step 1.
    11. In the New Data Source section, enter the information for the JNDI server or JMS resource used by your Java Messaging Service that you created in step 1, then click Next.

      Pega Cloud only: If you want to create an internal JNDI server or resource reference for use with your JMS model to make it compatible with a Pega Cloud deployment, make a request that states you need an internal JNDI server with your regional Pega Support representative by selecting New Request in My Support Portal. Pega Cloud Services creates an internal JNDI service reference for you to use in your instance of Pega Platform.

    12. Review the Service rules, Service Package, Service Listener, and Data Source details, and then click Finish.
  4. In the navigation pane of Dev Studio, click RecordsIntegration-ServicesService JMS.
    1. Select the Service Package that you created in step 3i.
    2. On the Request tab, in the Message data section, select the JMS message Data type that Pega Platform will receive as a message receiver client.
    3. In the Map to and Map to key fields, enter the object to which you want to map the received message. For example, pyLabel.

      For more information about Service JMS rules, see Service JMS form – Completing the Request tab.

  5. Click the Service tab of the Service JMS rule.
    1. In the Service activity section, in the Activity name field, click the Open icon.
    2. On the Steps tab, in the Method list, select Java.
    3. Click the Expand icon.
    4. In the Method Parameters section, enter a Java method that references the object that receives the message. For example:
      oLog.infoForce("received message:" + myStepPage.getString("pyLabel"));
    5. Click Save.
    6. In the Actions list, select Run.
What to do next: After Pega Platform receiving a message from your JMS sender client, the message appears in the object to which you mapped the JMS message.

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us