Before you Begin

This tutorial shows you how to configure Downstream Message Push using JMS and SOAP on the WebLogic server.

Overview

Downstream Message Push (DMP) adds ability to push messages downstream on completion of an activity before data is committed to DB. The functionality will be enabled by the configuration provided in business rule. This tutorial covers the DMP configuration on the WebLogic server through JMS and SOAP.

Scenario

In this business scenario we are setting the DownstreamMessagePush feature for the V11.3.1.0 version on the WebLogic server.

Pre-requisite

  1. The PAS.property should be setup to define the environment to be used to send messages.
  2. Verify if the Rules Palette version is 11.3.1.x.
  3. Set up admin console for tracking the messages. Admin console has AcOutboundEvent table which capture all the messages sent and responses received. How to Setup Admin Console on TomEE

Step 1 : Set Up

Modify the PAS.property file

In the PAS.properties file add the below property:

#-----------------------------------------------------------------------
# Development mode is pointed to Development environment
# Production mode is pointed to Production environment
# Test mode is pointed to Test environment
#-----------------------------------------------------------------------
downstream.service.event.mode=Development
#-----------------------------------------------------------------------
# Required for viewing JMX events published on Admin Console. For DMP, outboundEventPush entity needs to be added
#-----------------------------------------------------------------------
jmx.notification.entities=cycle,login,activity,activityprofiling,outboundEventPush

Step 2: JMS Set up on the Application Server

WebLogic

  • Step 1: Create a JMS Server
  • Step 2: Create a JMS Module
  • Step 3: Create a SubDeployment
  • Step 4: Create a Connection Factory
  • Step 5: Create a JMS Queue
  • Step 6: Create a WorkManager
  • Step 7: Enabling Tunneling for Adminserver (admin)
  • Step 8: Set Up TIMEOUTS
  • Step 9: To verify the message received by Queue

Step 1: Create a JMS Server

  1. Go to the Services > Messaging > JMS Servers
  2. Select New, and enter the below details:
    • Name: DownstreamMessagePushJMSServer
    • Persistent Store: (none)
    • Target: AdminServer
  3. Click Finish The JMS server should now be visible in the list with Health OK.

Step 2: Create a JMS Module

  1. Go to Services > Messaging > JMS Modules
  2. Select New.
    • Name: DownstreamMessagePushJMSModule, leave the other options empty
    • Targets: AdminServer
  3. Click Next, it displays the message Would you like to add resources to this JMS system module unchecked.
  4. Click Finish.

Step 3: Create a SubDeployment

A subdeployment is not necessary for the JMS queue to work, but it allows easy target subcomponents of the JMS module to a single target or group of targets. Use the subdeployment in this to target for the following connection factory and JMS queue to the JMS server that is created earlier.

  1. Go to Services > Messaging > JMS Modules.
  2. Select DownstreamMessagePushJMSModules.
  3. Select the Subdeployments tab and click New.
    • Subdeployment Name: DownstreamMessagePushSubdeployment
    • Click Next
  4. Select the target(s) for the subdeployment. Choose either Managed Server or JMS Servers. (DownstreamMessagePushJMSServer) such as the JMS Server created earlier. As the purpose of our subdeployment in this is to target a specific JMS server, choose the JMS Server option.
    • Select the DownstreamMessagePushJMSServer created earlier.
  5. Click Finish.

Step 4: Create Connection Factory

  1. Go to Services > Messaging > JMS Modules.
  2. SelectDownstreamMessagePushJMSModule and click New in the Configuration tab.
  3. Select Connection Factory option and click Next, enter the below values:
    • Name: DownstreamMessagePushConnectionFactory
    • JNDI Name: DownstreamMessagePushConnectionFactory
    • Leave the other values at default
  4. Click Next, then select Targets as AdminServer.
  5. Click Finish, the new connection factory is created.

Step 5: Create a JMS Queue

  1. Go to Services > Messaging > JMS Modules.
  2. Select DownstreamMessagePushJMSModule and click New in the Configuration Tab.
  3. Select Queue and click Next
    • Name: Provide name of the message queue. example DownstreamMessagePushQueue
    • JNDI Name: Provide JNDI name. example DownstreamMessagePushQueue
    • Template: None
  4. Click Next.
  5. Subdeployments: Give the name of the sub-deployment name in which Queue is supposed to be added. Example: DownstreamMessagePushSubdeployment
  6. Click Finish. The JMS queue is now complete and can be accessed using the JNDI names DownstreamMessagePushConnectionFactory and DownstreamMessagePushQueue.

Step 6: Create a WorkManager

  1. Go to Environments > Work Managers.
  2. Click New.
  3. Select Work Manager options.
  4. Provide name (wm/default).
  5. Select target server (AdminServer managed server).

Step 7: Enabling Tunneling for Adminserver (admin)

  1. Go to Environment > Servers.
  2. Click Adminserver(admin).
  3. Select Protocol tab and then select HTTP sub-tab.
  4. Select Enable Tunneling option.
  5. Click Save option. This is an important step to do otherwise all calls to outbound server fails.

Step 8: Set Up TIMEOUTS

There are different timeouts that can be setup in the JMS server. Server timeout

  1. Go to Environment > Servers.
  2. Select Adminserver(admin) option.
  3. Select Protocol tab.
  4. Select HTTP sub-tab, enter the following details:
    • Post Timeout: default 30 sec
    • HTTPS Duration: default 60 sec
    • Tunneling Client Timeout: default 40 sec
  5. Click Save to save the changes. These values are defaulted by Weblogic. ConnectionFactory - DownstreamMessagePushConnectionFactory
  6. Go to Services > JMS Modules > Select DownstreamMessagePushJMSModule.
  7. Select DownstreamMessagePushConnectionFactory.
  8. In the Configuration tab > select Default Deliver tab.
    • Send Timeout: default 10 milli sec. Transaction Timeout
  9. Go to Services > JMS Modules > Select DownstreamMessagePushJMSModule
  10. Select DownstreamMessagePushConnectionFactory
  11. In the Configuration tab > select Transaction tab
    • Transaction Timeout: default 3600 sec. These values are defaulted by Weblogic.

Step 9: To verify the message received by Queue

When the setup is done this queue is empty, when the DMP feature is configured and the messages are sent by OIPA then this queue displays the messages sent.

  1. In the Administration Console, expand Services > Messaging > JMS Modules.
  2. In the JMS Modules table, click JMS module that contains the configured queue that you want to access. In this case, DownstreamMessagePushJMSModule.
  3. In the selected JMS module's Summary of Resources, select the queue to monitor. example: DownstreamMessagePushQueue
  4. Select the Monitoring tab.
  5. Click ShowMessage to view messages on the queue.

Step 3: Configure DownstreamMessagePushDefinition using JMS and SOAP

DownstreamMessagePushDefinition defines message delivery using JMS protocol. Refer to the XML Configuration guide for more details on the DownstreamMessagePush Elements and Attributes
The parameters for setting up DMP with JMS protocol is mentioned below:

<ProviderUrl> </ProviderUrl>
<ConnectionFactory> </ConnectionFactory>
<JMSdestination> </JMSdestination>
<JMSDeliveryMode> </JMSDeliveryMode>
<JMSPriorityLevel> </JMSPriorityLevel>
<JMSTimetoLive> </JMSTimeToLive>
<JMSAcknowledgement> </JMSAcknowledgement>

XML Schema

Schema for JMS

<DownstreamMessagePushDefinition>
   <Event EVENTNAME=" " EVENTMETHOD="JMS" ENV=" ">
   <JmsConfiguration>
        <ProviderUrl> </ProviderUrl>
        <ConnectionFactory> </ConnectionFactory>
        <DestinationName> </DestinationName>
        <DeliveryMode> </DeliveryMode>
        <PriorityLevel> </PriorityLevel>
        <TimetoLive> </TimetoLive>
        <AcknowledgementMode> </AcknowledgementMode>
        <MaxTimeOut> </MaxTimeOut>
   </JmsConfiguration>
   <Security>
       <UserName> </UserName>
       <Password> </Password>
    </Security>
  </Event>
</DownstreamMessagePushDefinition>

Step 4: Configure the DownstreamMessagePushDefinition

  1. Go to the Rules Palette > Global Explorer > Business Rules.
  2. Select System Rule from Business Rule and right-click to select New Global Rule for Category System.
  3. In the New Global Rule window, enter the new business Rule name DownstreamMessagePush and click Next.
  4. Select Company and Plan and select type code as system and click Next.
  5. Click Finish, the DownstreamMessagePushDefinition business rule is created.
  6. Add the below example and checking the rule. For JMS use the below example
    <DownstreamMessagePushDefinition>
       <Event ENV="Development" EVENTMETHOD="JMS" EVENTNAME="Billing">
           <JMSConfiguration>
               <ProviderUrl>http://<hostname>:7001</ProviderUrl>
               <ConnectionFactory>ConnectionFactory</ConnectionFactory>
               <DestinationName>dynamicQueues/DownstreamMessagePushQueue</DestinationName>
               <MaxTimeOut>1000000</MaxTimeOut>
           </JMSConfiguration>
           <Security>
               <UserName>username</UserName>
               <Password>password</Password>
           </Security>
       </Event>
    </DownstreamMessagePushDefinition>
    
    For SOAP use the below example
    <DownstreamMessagePushDefinition>
     <Event EVENTNAME="EVENT_DMPSOAP1" EVENTMETHOD="SOAP" ENV="Development">
         <SoapConfiguration SECURITYTYPE="WSS">
             <WsdlLocation>http://hostname:port/PASJava/FileReceived?wsdl</WsdlLocation>
             <ServiceName>{http://FileReceived}FileReceived</ServiceName>
             <PortName>{http://FileReceived}PasFileReceivedPort</PortName>
             <InvokeOneWay>true</InvokeOneWay>
             <MaxTimeOut>10</MaxTimeOut>
         </SoapConfiguration>
         <Security>
             <UserName>qatester3</UserName>
             <Password>OBc+Mtt4Z7eq4ORb7yUiGg==</Password>
         </Security>
     </Event>
    </DownstreamMessagePushDefinition>
    

    Step 5: Create Transaction

    To create Transaction for the DownstreamMessagePush
  7. Go to Main Explorer > Companies > Prototype > Subsidiary Companies.
  8. In the Prototype Individual Child Company > Product > Individual Prototype Product > Plans > Functional Prototype Product.
  9. Select Transaction and right-click Transaction and click New Transaction.
  10. In the New Transaction text box, enter the name DownstreamMessagePush and click Next.
  11. Select the Transaction Type as Policy-Financial and click Next.
  12. Add the below configuration and check in the changes.
    <Transaction>
     <EffectiveDate STATUS="Enabled" TYPE="SYSTEM"/>
     <Fields>
         <Field>
             <Name>TextArea1</Name>
             <Display>Text Area 1 Field</Display>
             <DataType>TextArea</DataType>
         </Field>
         <Field>
             <Name>GraceMoney</Name>
             <Display>Grace Money Received</Display>
             <DataType>Money</DataType>
             <Currency>EUR,JPY,THB,TWD,USD</Currency>
             <DefaultValue>0</DefaultValue>
         </Field>
         <Field>
             <Name>SomeDate</Name>
             <Display>Date</Display>
             <DataType>Date</DataType>
         </Field>
         <Field>
             <Name>field2</Name>
             <Display>Grace Money Comment</Display>
             <DataType>Text</DataType>
         </Field>
         <Field>
             <Name>Test</Name>
             <Display>GraceMoney Comment21</Display>
             <DataType>Text</DataType>
         </Field>
         <Field>
             <Name>PolicyCurrencySupportTest1</Name>
             <Display>Bug Retest Currency21</Display>
             <DataType>Money</DataType>
             <DefaultValue>0</DefaultValue>
         </Field>
         <Field>
             <Name>PaymentMode</Name>
             <Display>PaymentMode</Display>
             <DataType>Decimal</DataType>
             <DefaultValue>1</DefaultValue>
         </Field>
     </Fields>
     <Math>
         <MathVariables>
             <MathVariable VARIABLENAME="True" TYPE="VALUE" DATATYPE="TEXT">01</MathVariable>
             <MathVariable VARIABLENAME="False" TYPE="VALUE" DATATYPE="TEXT">00</MathVariable>
             <MathVariable VARIABLENAME="ActivityEffectiveDate" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="CONVERT" TOFORMAT="YYYY-'W'ww-u">Activity:EffectiveDate</MathVariable>
             <MathVariable VARIABLENAME="EventDateTime" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="GENERATE" TOFORMAT="YYYY-'W'ww-u"/>
             <MathVariable VARIABLENAME="RequiredMV" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable>
             <MathVariable VARIABLENAME="ActivityEffDate" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable>
             <MathVariable VARIABLENAME="PaidToDate" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable>
             <MathVariable VARIABLENAME="BigTextMV1" TYPE="FIELD" DATATYPE="BIGTEXT">Activity:TextArea1</MathVariable>
             <MathVariable VARIABLENAME="payerName" TYPE="VALUE" DATATYPE="TEXT">Chris Snow</MathVariable>
             <MathVariable VARIABLENAME="isReBill" TYPE="VALUE" DATATYPE="BOOLEAN">false</MathVariable>
         </MathVariables>
     </Math>
    </Transaction>
    
  13. Go to Admin Explorer tab > Security > Application Security > Security folder.
  14. Select Prototype > Company Security > Transaction Security folder > Prototype Individual Child Company and then right-click to select Grant Access to All Transaction to provide the authorization for the Transaction.
  15. In the Functional Prototype Product > Plan Rule, select EligibleTransactionByPolicy Status add the newly created Transaction "DownstreamMessagePushDefinition".

Step 6: Configure PushNotifications

To configure the PushNotification, perform the following:

  1. Go to the Rules Palette > Global Explorer > Business Rules.
  2. Select Attach Business Rule and right-click Attached Rule and select the New Global Rule for Category "Attached".
  3. The New Global Rule window appears, enter the new business Rule name as PushNotifications and click *Next.*
  4. Select Transaction and click Next (select the transaction where we want to override this new business rule) and click Next.
  5. Click Finish, then PushNotifications Business rule is created.
  6. Add the below example (configuration) and checking the rule.
    <PushNotifications>
     <Templates>
         <Template ID="Header">
             <JSTLMessage>
                 <Parameters>
                     <Parameter DATATYPE="FORMATDATE" NAME="ActivityEffectiveDate">ActivityEffectiveDate</Parameter>
                     <Parameter DATATYPE="Text" NAME="ActivityGUID">Activity:ActivityGUID</Parameter>
                 </Parameters>
                 <ActivityGUID>[ActivityGUID]</ActivityGUID>
                 <ActivityEffectiveDate>[ActivityEffectiveDate]</ActivityEffectiveDate>
                 <EventDateTime>[EVENTDATETIME]</EventDateTime>
             </JSTLMessage>
         </Template>
         <Template ID="Header1">
             <JSTLMessage>
                 <Parameters>
                     <Parameter DATATYPE="Date" NAME="EFFdate">Activity:EffectiveDate</Parameter>
                 </Parameters>
                 <EffectiveDate>[EFFdate]</EffectiveDate>
             </JSTLMessage>
         </Template>
     </Templates>
     <!-- Sample message template -->
     <PushNotification EVENTNAME="Billing">
         <Message ID="BillingMsg1">
             <Tests>
                 <Test>1=1</Test>
                 <Test>1=1</Test>
             </Tests>
             <AsEventMessage xmlns="http://xmlns.alamere.com/PAS/AsEventMessage">
                 <JSTLTemplate>Header</JSTLTemplate>
                 <JSTLTemplate>Header1</JSTLTemplate>
                 <JSTLMessage>
                     <Parameters>
                         <Parameter DATATYPE="TEXT" NAME="payerName">payerName</Parameter>
                         <Parameter DATATYPE="BOOLEAN" NAME="isReBill">isReBill</Parameter>
                         <Parameter DATATYPE="BIGTEXT" NAME="BigTextMV1">BigTextMV1</Parameter>
                         <Parameter DATATYPE="Date" NAME="RequiredMV">RequiredMV</Parameter>
                     </Parameters>
                     <Billing>
                         <Reversal>[REVERSAL]</Reversal>
                         <BigTextMV1>[BigTextMV1]</BigTextMV1>
                         <payerName>[payerName]</payerName>
                         <isReBill>[isReBill]</isReBill>
                     </Billing>
                     <Premium>
                         <Area>[BigTextMV1]</Area>
                         <Date>[RequiredMV]</Date>
                     </Premium>
                 </JSTLMessage>
             </AsEventMessage>
         </Message>
     </PushNotification>
     <OnPushFailure>
         <RollbackTransaction>Yes</RollbackTransaction>
         <CreateBusinessError>Yes</CreateBusinessError>
     </OnPushFailure>
    </PushNotifications>
    

Step 7: Process Activity in OIPA

  1. Login to OIPA application, go to Policy Activity Screen add the DownstreamMessagePushDefinition transaction configured above from the add activity option.
  2. Enter the values in the fields and save the activity.
  3. Process the activity.
  4. The activity should be processed successfully.

Step 8: To View Messages sent to Downstream systems

Admin Console DB is used to set up admin console for tracking the messages. To view the messages launch SQL Database and in the Admin Console Database, query for AcOutboundEvent table and verify the message sent.