Before you Begin
This tutorial shows you how to configure Downstream Message Push using JMS and SOAP on the Websphere server.
Overview
Downstream Message Push (DMP) adds ability to push messages downstream on completion of an activity before data is committed to Database. The functionality will be enabled by the configuration provided in business rule.
Scenario
In this tutorial we are using the Prototype company and its default configuration for setting the DownstreamMessagePush feature for the V11.3.1.0 version on the WebSphere server. This tutorial covers the DMP configuration using JMS and SOAP on the WebSphere server.
Pre-requisite
. Verify which version of WebSphere server is installed.
- The PAS.property should be setup to define the environment to be used to send messages.
- Verify if the Rules Palette version is 11.3.1.x.
- Verify if Acoutboundevent table is created in Admin Console database. How to Setup Admin Console on WebSphere
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
Configure WebSphere
- Step 1: Introduction and Definitions
- Step 2: Configuration Steps
- Step 3: Configure the service bus
- Step 4: Configure the bus members
- Step 5: Configure the destinations
- Step 6: Configure JMS connection queue factory
- Step 7: Configure JMS Queue
- Step 8: Verify the messaging engine startup
Step 1: Introduction and Definitions
A JMS queue in WebSphere Server is associated with a number of additional resources: The high-level configuration steps are as follows to configure messaging within WebSphere Application Server for the MDB sample:
- Configure the service bus
- Configure the bus members
- Configure the destinations
- Verify the messaging engine startup
- Configure JMS connection queue factory
- Configure the destination JMS queue
A service integration bus supports applications using message-based and service-oriented architectures. A bus is a group of one or more interconnected servers or server clusters that are members of the bus. Applications connect to a bus at one of the messaging engines associated with its bus members.
|DownstreamMessagePushJMSServer|SIB (BUS Name)||
|~|~|~~~|
|DownstreamMessagePushConnectionFactory| Queue Connection Factories| DownstreamMessagePushConnectionFactory|
|DownstreamMessagePushQueue | JMS Queue| DownstreamMessagePushQueue|
Step 2: Configuration Steps
Pre-requisites for running DMP: SIB will be pointed to a OIPA server which should be up and running.
Step 3: Configure the service bus
From the WebSphere Administrative Console, select Service integration > Buses.
- Click New.
- Enter the following and then click OK:
- Name: DownstreamMessagePushJMSServer
- Uncheck Bus Security
- Click Next and click Finish on the next Screen. On successful creation.
Step 4: Configure the bus members
To configure the Bus members, perform the following:
- Select Service integration > Buses.
- Click the DownstreamMessagePushJMSServer created in the previous section.
- Under Topology on right hand side click Bus members
- Click Add, on the next page select the OIPA server for Server.
- Click Next and in the next window select File Store.
- Click Next > Next > Finish. After successful creation you should be seeing the bus member that is added.
Step 5: Configure the destinations
To configure the destinations for messaging, perform the following:
- Select Service integration > Buses.
- Click the DownstreamMessagePushJMSServer.
- Under Destination Resources, click Destinations.
- Click New and select Queue and give the Queue Name as DownstreamMessagePushQueue.
- Click Next and select the Bus member that is created earlier.
- Click Next > Finish. After successful creation of Queue you should be seeing it.
Step 6: Configure JMS connection queue factory
To configure the JMS connection queue factory, do the following:
- Display the default messaging provider.
- Select Resources > JMS Providers.
- In the opened window, select Default Messaging Provider.
- In the opened window select Queue Connection Factory.
- Click New, and enter the Connection factory Details as below:
- Name: DownstreamMessagePushConnectionFactory
- JNDI Name: DownstreamMessagePushConnectionFactory
- Bus: DownstreamMessagePushJMSServer
- Provider End Point:
PortNumber, port number above will be the server end point address and can be checked at Server > Ports. Provider end point above will be : SIB end point can be seen by clicking on Server > Ports > Default will be localhost:727 - Click Apply and save to master configuration.
Note: After successful creation of Queue Connection factory, you should be seeing it under Queue Connection factories.
Step 7: Configure JMS Queue
- Select Resources > JMS Providers.
- Click Default messaging provider and click Queues under the Additional Properties. Click New, in the Queue Details as given below:
- Name: DownstreamMessagePushQueue
- JNDI Name: DownstreamMessagePushQueue
- Bus Name: DownstreamMessagePushJMSServer
- Queue: DownstreamMessagePushQueue
- Apply and save to master configuration.
Step 8: Verify the messaging engine startup
To verify the messaging engine startup, perform the following:
- Ensure the application server has been restarted.
- Start the WebSphere Administrative Console.
- Select Service integration > Buses.
- Click DownstreamMessagePushJMSServer.
- Under Topology click Messaging engines. The green arrow is available under the Status to note the Node.server-DownstreamMessagePushJMSServer Messaging Engine has been started.
Step 3 Configure DownstreamMessagePushDefinition
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
- Go to the Rules Palette > Global Explorer > Business Rules.
- Select System Rule from Business Rule and right-click to select New Global Rule for Category System.
- In the New Global Rule window, enter the new business Rule name DownstreamMessagePush and click Next.
- Select Company and Plan and select type code as system and click Next.
- Click Finish, the DownstreamMessagePushDefinition business rule is created.
- Add the below example and checking the rule.
For JMS use the below example
<DownstreamMessagePushDefinition>
<Event ENV="Development" EVENTMETHOD="JMS" EVENTNAME="Billing">
<JMSConfiguration>
<ProviderUrl>tcp://<hostname>:port</ProviderUrl>
<ConnectionFactory>ConnectionFactory</ConnectionFactory>
<DestinationName>dynamicQueues/DownstreamMessagePushQueue</DestinationName>
<MaxTimeOut>1000000</MaxTimeOut>
</JMSConfiguration>
<Security>
<UserName>admin</UserName>
<Password>6BWYeciXwE/8PJrnWQ7syQ==</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
- Go to Main Explorer > Companies > Prototype > Subsidiary Companies.
- In the Prototype Individual Child Company > Product > Individual Prototype Product > Plans > Functional Prototype Product.
- Select Transaction and right-click Transaction and click New Transaction.
- In the New Transaction text box, enter the name DownstreamMessagePush and click Next.
- Select the Transaction Type as Policy-Financial and click Next.
- 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>
- Go to Admin Explorer tab > Security > Application Security > Security folder.
- 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.
- 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:
- Go to the Rules Palette > Global Explorer > Business Rules.
- Select Attach Business Rule and right-click Attached Rule and select the New Global Rule for Category "Attached".
- The New Global Rule window appears, enter the new business Rule name as PushNotifications and click Next.
- Select Transaction and click Next (select the transaction where we want to override this new business rule) and click Next.
- Click Finish, then PushNotifications business rule is created.
- 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
- Login to OIPA application, go to Policy Activity Screen add the DownstreamMessagePushDefinition transaction configured above from the add activity option.
- Enter the values in the fields and save the activity.
- Process the activity.
- 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.