Push Notifications
The PushNotifications attached business rule can be configured to send downstream messages after post-assignment processing and before activity changes are persisted. A message is generated when an event defined in the DownstreamMessagePushDefinition rule occurs and is sent using the delivery configuration defined for that event. The rule can be overridden at the Activity Plan, Activity Policy, Activity Client, and Activity Company levels.
Note: The rule should not be listed in the TransactionBusinessRules packet, but is processed after post-assignment processing and before activity changes are persisted.
The PushNotifications ABR allows the user to define messages for "Successful Activity Processing or when the Activity Processing Fails (OnTransactionFailure)" and send the appropriate messages to the downstream. The rule can be configured to create a business error on activity, to rollback an activity in case of message push failure or to continue processing an activity.
PushNotifications uses custom-built expressions to construct the required messages. Message templates can be created using custom configuration. Parameters allows values from math or activity fields and feeds the values to JSTL elements.
Note: Math required for PushNotifications to construct JSTL messages should be defined in Transaction XML. Date generation and date format conversion can be done by configuring a MathVariable. Refer to the examples mentioned in the below sections.
Events
A user can configure a single message or multiple messages for each events and map each event to different downstream applications. When multiple messages are defined for an event, system validates a condition, and sends appropriate message to the downstream.
<PushNotifications> may include multiple <PushNotification> for each event, which can be triggered for a particular EVENTNAME that is defined as <Event> in DownstreamMessagePushDefinition rule.
Transactions
PushNotifications can be configured to push messages for all activity types of all entities such as Plan, Policy (Policy document, Policy financial etc.), Client, Company and Customer.
<OnPushFailure>: Defines an action that needs to be taken in case of Push failure. It can be configured to,
-
define an action to be taken in case of exceptions during message push such as, call to the external system fails or timeout. An activity can be rolled back in case of push failure.
-
display business errors and warnings in case of push failure.
-
generate errors and warnings for an activity, when <RollBackTransaction> is 'Yes' and <CreateBusinessError> is 'Yes' .
-
generate errors and warnings for an activity, when <RollBackTransaction> is 'No' and <CreateBusinessError> is 'Yes' .
<OnTransactionFailure>:Creates an error message or an indication that should be pushed to downstream when an activity processing fails.
-
If PushNotifications ABR has error configuration for OnTransactionFailure, then an error message is sent to downstream in case of activity failure. If PushNotification event doesn't have OnTransactionFailure message configured, no message is sent to downstream if activity fails.
-
Multiple OnTransactionFailure messages for each event can be defined in OnTransactionFailure message section of PushNotifications. Each event can have a single OnTransactionFailure message. OnTransactionFailure message is sent to all the events defined in PushNotifications.
Note: Configuring a message using <OnTransactioFailure> is optional.
Activity XML: Activity XML of PushNotifications captures the status and reason for failure of an activity processing.
Note: Below variables will get auto populated if configured as below in PushNotifications.
-
MESSAGEGUID will be autopopulated. JSTL variable for MESSAGEGUID is ${MESSAGEGUID}.
-
REVERSAL is auto populated based on the processing status of the activity. It's value is 'True' for Reversal processing and 'False' for forward processing.
-
JSTL variable for reversal is ${REVERSAL}
-
<ApplicationID> tag will print the literal value provided in the configuration.
-
EVENTDATETIME gets auto populated based on the time of processing the event. It is the timestamp at which the event is getting processed. JSTL variable for event datetime is ${EVENTDATETIME}
-
Two math variables needs to be defined at transaction xml one for Generate time format and other for date format conversion. And the EventDateTime will be printed in the same format if configured in PushNotifications.
For Kafka configuration, see Kafka Security Configuration Guide.
For PushNotifications messages can use nested parent and child message elements. For configuration details, see Nested Message Structures.
For PushNotifications messages can use MAP and TEXTARRAY Math collections with j:forEach to generate repeating message elements. For configuration details, see Collections in Messages.
Request and Response for PushNotifications
| Request format | Responses |
|---|---|
|
|
PushNotifications - Elements and Attributes
| Element/Tag | Parent Element | Definition | Attribute | Element/Attribute Value and Description |
|---|---|---|---|---|
| <PushNotifications> | Opening tag of PushNotificationsBusiness rule. | |||
| <Templates> | <PushNotifications> | Parent tag for templates. | ||
| <Template> | <Templates> | Optional: Messages to be reused can be defined as template. | ||
| <Template> | ID | Name / id of the message | ||
| <JSTLMessage> | <Template> | Required: JSLT tags to create message. | ||
| <Parameters> | <JSTLMessage> | Parent tag for parameters | ||
| <Parameter> | <Parameters> | Required: Parameter mapped to math and passed to JSTL message element. | ||
| <Parameter> | NAME | Required: Name of the parameter. | ||
| <Parameter> | TYPE | Optional: Type is required for complex math types | ||
| <Parameter> | DATATYPE | Required: Value is the datatype of math variable. | ||
| <PushNotification> | <PushNotifications> | Required and repeatable: Contains all the events and their respective messages. | ||
| <PushNotification> | EVENTNAME | Name of the event. | ||
| <OnTransactionFailure> | <PushNotification> | |||
| <Tests> | <Message> | Parent tag for test | ||
| <Test> | <Tests> | Specifies a test expression. Expression is validated and if it is true the message under the test tag will be pushed. | ||
| <Test> | <Tests> <Test>condition</Test></Tests> | Expression for test condition. | ||
| <Message> | <PushNotification> | Required: Parent tag for the message. | ||
| <Message> | ID | Name of the message. | ||
|
<JSTLTemplate> |
<Message> | Optional: Reusable template can be combined with message to be sent downstream. | <Message> <JSTLTemplate>template-id</JSTLTemplate></Message> | |
| <JSTLMessage> | <Message> | Required: JSLT tags to create message. | ||
| <Parameters> | <JSTLMessage> | Contains parameters of JSTL message. | ||
| <Parameter> | <Parameters> | Required: Parameter mapped to math or activity field and passed to JSTL message element. | ||
| <Parameter> | NAME | Required: Name of the parameter. | ||
| <Parameter> | TYPE | Optional: Type is required for complex math types. | ||
| <Parameter> | DATATYPE | Required: Value is the datatype of math variable. | ||
| <OnTransactionFailure> | <PushNotification> |
C Event-level <OnTransactionFailure> selects the failure-message ID.Rule-level <OnTransactionFailure> contains <Message ID="...">, which defines the failure message. |
||
| <Message> | <OnTransactionFailure> | Defines a transaction-failure message. Its ID must match the related failure message ID value. | ID | Required: Message ID |
| <JSTLMessage> | <Message> | Required: JSLT tags to create message | ||
| <Parameters> | <JSTLMessage> | Parent tag for parameters | ||
| <Parameter> | <Parameters> | Required: Parameter mapped to math and passed to JSTL message element. | ||
| <Parameter> | NAME | Required: Name of the parameter | ||
| <Parameter> | TYPE | Optional: Type is required for complex math types. | ||
| <Parameter> | DATATYPE | Required: Value is the datatype of math variable. | ||
| <OnPushFailure> | <PushNotifications> | Required: Parent tag for push failure actions | ||
| <RollbackTransaction> | <OnPushFailure> |
Required: Values are yes/No Yes: indicates a rollback is required No: indicates rollback is not needed |
||
| <CreateBusinessError> | <OnPushFailure> |
Required: Values are yes/No Yes: indicates a business error needs to be created on activity No: indicates business error is not needed |
XML Schema - PushNotifications
<PushNotifications>
<Templates>
<Template ID="template-id">
<JSTLMessage>
<Parameters>
<Parameter NAME="[parameter name]" DATATYPE="[datatype]">[field | variable]</Parameter>
</Parameters>
<!-- Reusable message content -->
</JSTLMessage>
</Template>
</Templates>
<PushNotification EVENTNAME="[eventname]">
<OnTransactionFailure>[failure message ID]</OnTransactionFailure>
<Message ID="[message ID]">
<Tests>
<Test>[condition]</Test>
</Tests>
<AsEventMessage xmlns="[namespace]">
<!-- Place the template reference at the required business-element location. -->
<JSTLTemplate>template-id</JSTLTemplate>
<JSTLMessage>
<Parameters>
<Parameter NAME="[parameter name]" DATATYPE="[datatype]">[field | variable]</Parameter>
</Parameters>
<!-- Message-specific content -->
</JSTLMessage>
</AsEventMessage>
</Message>
</PushNotification>
<OnTransactionFailure>
<Message ID="[failure message ID]">
<AsEventMessage xmlns="[namespace]">
<JSTLTemplate>template-id</JSTLTemplate>
<JSTLMessage>
<Parameters>
<Parameter NAME="[parameter name]" DATATYPE="[datatype]">[field | variable]</Parameter>
</Parameters>
<!-- Transaction-failure message content -->
</JSTLMessage>
</AsEventMessage>
</Message>
</OnTransactionFailure>
<OnPushFailure>
<RollbackTransaction>[Yes | No]</RollbackTransaction>
<CreateBusinessError>[Yes | No]</CreateBusinessError>
</OnPushFailure>
</PushNotifications>
Transaction
<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>some Date</Display>
<DataType>Date</DataType>
</Field>
<Field>
<Name>field2</Name>
<Display>GraceMoney 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>
DownstreamMessagePushDefinition
<DownstreamMessagePushDefinition>
<Event ENV="Production" EVENTMETHOD="JMS" EVENTNAME="Billing">
<JMSConfiguration>
<ProviderUrl>tcp://host:port</ProviderUrl>
<!--ProviderUrl>http://host:port/PASJava</ProviderUrl-->
<ConnectionFactory>ConnectionFactory</ConnectionFactory>
<DestinationName>dynamicQueues/DownstreamMessagePushQueue</DestinationName>
<MaxTimeOut>1000000</MaxTimeOut>
</JMSConfiguration>
<Security>
<UserName>admin</UserName>
<Password>6BWYeciXwE/8PJrnWQ7syQ==</Password>
</Security>
</Event>
</DownstreamMessagePushDefinition>
XML Example 2
<PushNotifications>
<Templates>
<Template ID="Header">
<JSTLMessage>
<Parameters>
<Parameter NAME="MsgGuid" DATATYPE="TEXT">MsgGUID</Parameter>
<Parameter NAME="EFFdate" DATATYPE="DATE">EffectiveDate</Parameter>
<Parameter NAME="ActGuid" DATATYPE="TEXT">ActivityGUID</Parameter>
<Parameter NAME="Datetime" DATATYPE="DATE">ActivityDateTime</Parameter>
<Parameter NAME="Reverse" DATATYPE="BOOLEAN">Reverse</Parameter>
</Parameters>
<MsgGuid>[MsgGuid]</MsgGuid>
<EffectiveDate>[EFFdate]</EffectiveDate>
<ActivityDateTime>[Datetime]</ActivityDateTime>
<ActivityGuid>[ActGuid]</ActivityGuid>
<Reverse>[Reverse]</Reverse>
</JSTLMessage>
</Template>
</Templates>
<PushNotification EVENTNAME="Billing">
<Message ID="BillingMsg1">
<Tests>
<Test CONDITION="ListBill='True'"/>
</Tests>
<AsEventMessage xmlns="http://xmlns.example.com/PAS/AsEventMessage">
<JSTLTemplate>Header</JSTLTemplate>
<JSTLMessage>
<Parameters>
<Parameter NAME="TransactionName" DATATYPE="TEXT">TransactionName</Parameter>
<Parameter NAME="Segment" DATATYPE="TEXT">Segment</Parameter>
<Parameter NAME="TransactionCount" DATATYPE="INTEGER">TransactionCount</Parameter>
<Parameter NAME="Event" DATATYPE="TEXT">Event</Parameter>
</Parameters>
<Billing>
<Event>[Event]</Event>
<TransactionName>[TransactionName]</TransactionName>
<Segment>[Segment]</Segment>
<TransactionCount>[TransactionCount]</TransactionCount>
</Billing>
</JSTLMessage>
</AsEventMessage>
</Message>
<OnTransactionFailure>BillingFailureMsg</OnTransactionFailure>
</PushNotification>
<OnTransactionFailure>
<Message ID="BillingFailureMsg">
<AsEventMessage xmlns="http://xmlns.example.com/PAS/AsEventMessage">
<JSTLTemplate>Header</JSTLTemplate>
<JSTLMessage>
<Parameters>
<Parameter NAME="MsgGuid" DATATYPE="TEXT">MsgGUID</Parameter>
<Parameter NAME="EFFdate" DATATYPE="DATE">ActivityEffectiveDate</Parameter>
<Parameter NAME="PaidToDate" DATATYPE="DATE">PaidToDate</Parameter>
<Parameter NAME="Fee" DATATYPE="INTEGER">PolicyFee</Parameter>
</Parameters>
<Failure>
<MsgGuid>[MsgGuid]</MsgGuid>
<EffectiveDate>[EFFdate]</EffectiveDate>
<PaidToDate>[PaidToDate]</PaidToDate>
<PolicyFee>[Fee]</PolicyFee>
</Failure>
</JSTLMessage>
</AsEventMessage>
</Message>
</OnTransactionFailure>
<OnPushFailure>
<RollbackTransaction>Yes</RollbackTransaction>
<CreateBusinessError>Yes</CreateBusinessError>
</OnPushFailure>
</PushNotifications>
Output Example
<MsgGuid> 9B5AA155-4F7B-46AC-9A92-A253BE14C6B7</MsgGuid>
<EffectiveDate> 2016-11-01</EffectiveDate>
<ActivityDateTime>2018-07-18T09:32:12.643-05:00 </ActivityDateTime>
<ActivityGuid> AB4016A2-573D-4918-A94D-1F786725B717 </ActivityGuid>
<Event>Billing</Event>
<MsgId>BillingMsg1</MsgId>
<Transaction name="Transaction2">
<Segment name="Segment21">
<BillingTotal>111</BillingTotal>
</Segment>
<Segment name="Segment22">
<BillingTotal>222</BillingTotal>
</Segment>
</Transaction>
<Transaction name="Transaction1">
<Segment name="Segment11">
<BillingTotal>100</BillingTotal>
</Segment>
<Segment name="Segment12">
<BillingTotal>200</BillingTotal>
</Segment>
</Transaction>
Output - OnTransactionFailure
<Failure>
<MessageGuid>9B5AA155-4F7B-46AC-9A92-A253BE14C6B7</MessageGuid>
<EffectiveDate>2016-11-01</EffectiveDate>
<ActivityDateTime>2018-07-18T09:32:12.643-05:00</ActivityDateTime>
<ActivityGuid>AB4016A2-573D-4918-A94D-1F786725B717</ActivityGuid>
<ActivityStatus>Pending</ActivityStatus>
</Failure>
Example of a JSTL Template
<PushNotifications>
<Templates>
<Template ID="BillingDetails">
<JSTLMessage>
<Parameters>
<Parameter NAME="EventName" DATATYPE="TEXT">Activity:Event</Parameter>
<Parameter NAME="EffectiveDate" DATATYPE="DATE">Activity:EffectiveDate</Parameter>
<Parameter NAME="PolicyNumber" DATATYPE="TEXT">Activity:PolicyNumber</Parameter>
<Parameter NAME="PaidToDate" DATATYPE="DATE">Activity:PaidToDate</Parameter>
<Parameter NAME="ModalPremium" DATATYPE="DECIMAL">ModalPremium</Parameter>
<Parameter NAME="EFTModalPremium" DATATYPE="DECIMAL">EFTModalPremium</Parameter>
<Parameter NAME="AnnualDiscount" DATATYPE="DECIMAL">AnnualDiscount</Parameter>
</Parameters>
<EventName>[EventName]</EventName>
<EffectiveDate>[EffectiveDate]</EffectiveDate>
<PolicyNumber>[PolicyNumber]</PolicyNumber>
<PaidToDate>[PaidToDate]</PaidToDate>
<Premium>
<ModalPremium>[ModalPremium]</ModalPremium>
<EFTModalPremium>[EFTModalPremium]</EFTModalPremium>
<AnnualDiscount>[AnnualDiscount]</AnnualDiscount>
</Premium>
</JSTLMessage>
</Template>
</Templates>
<PushNotification EVENTNAME="Billing">
<Message ID="BillingMsg1">
<Tests>
<Test>1=1</Test>
</Tests>
<AsEventMessage xmlns="http://xmlns.example.com/PAS/AsEventMessage">
<JSTLTemplate>BillingDetails</JSTLTemplate>
</AsEventMessage>
</Message>
</PushNotification>
</PushNotifications>
Output
<Message>
<Event EVENTNAME="Billing">
<MsgGUID> 9B5AA155-4F7B-46AC-9A92-A253BE14C6B7</MsgGUID>
<EffectiveDate> 2016-11-01</EffectiveDate>
<PolicyNumber>A000075449 </PolicyNumber>
<PaidToDate>2017-11-01 </PaidToDate>
<Premium>
<ModalPremium>380 </ModalPremium>
<EFTModalPremium>400 </EFTModalPremium>
<AnnualDiscount> 20 </AnnualDiscount>
</Premium>
</Event>
</Message>
Parameter Element
The <Parameter> element in PushNotifications is used to map the MathVariable with JSTL message and has attributes TYPE and DATATYPE. DATATYPE is a required attribute whereas TYPE is optional and is required for complex TYPE's. PushNotifications support the following combination of DATATYPE and TYPE. Math Variable should be defined in transaction for each parameter with its Type and Datatype
|
DATATYPE |
TYPE |
|
BIGTEXT |
FIELD |
|
BOOLEAN |
EXPRESSION |
|
BOOLEAN |
VALUE |
|
CURRENCY |
FIELD |
|
DATE |
ACTIVITYFIELD |
|
DATE |
EXPRESSION |
|
DATE |
FIELD |
|
DATE |
FUNCTION |
|
DATE |
FUNCTIONCALL |
|
DATE |
IIF |
|
DATE |
PLANFIELD |
|
DATE |
POLICYFIELD |
|
DATE |
SQL |
|
DATE |
SYSTEMDATE |
|
DATE |
VALUE |
|
DECIMAL |
EXPRESSION |
|
DECIMAL |
FIELD |
|
DECIMAL |
FUNCTION |
|
DECIMAL |
IIF |
|
DECIMAL |
MULTIFIELD |
|
DECIMAL |
PLANFIELD |
|
DECIMAL |
POLICYFIELD |
|
DECIMAL |
SQL |
|
DECIMAL |
VALUE |
|
FORMATDATE |
DATE |
|
FORMATDATE |
DATE |
|
INTEGER |
FUNCTION |
|
INTEGER |
SQL |
|
INTEGER |
VALUE |
|
INTEGER |
EXPRESSION |
|
TEXT |
EXPRESSION |
|
TEXT |
IIF |
|
TEXT |
POLICYFIELD |
|
TEXT |
SQL |
|
TEXT |
VALUE |
Example for Date format Conversion in a Transaction
Define two math variables in the transaction xml, one to generate time format and the other for date format conversion. The EVENTDATETIME is printed in the same format if configured in PushNotifications.
<MathVariable VARIABLENAME="EventDateTime" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="GENERATE" TOFORMAT="yyyy-MM-dd 'at' HH:mm:ss z"></MathVariable>
<MathVariable VARIABLENAME="ActivityEffectiveDate" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="CONVERT" TOFORMAT="yyyy-MM-dd 'at' HH:mm:ss zs">Activity:EffectiveDate</MathVariable>
Date formats that are supported are listed in the table below:
| a | Am/pm marker | Text | PM |
| D | Day in year | Number | 189 |
| d | Day in month | Number | 10 |
| E | Day name in week | Text | Tuesday; Tue |
| F | Day of week in month | Number | 2 |
| H | Hour in day (0-23) | Number | 0 |
| h | Hour in am/pm (1-12) | Number | 12 |
| k | Hour in day (1-24) | Number | 24 |
| K | Hour in am/pm (0-11) | Number | 0 |
| M | Month in year | Month | July; Jul; 07 |
| m | Minute in hour | Number | 30 |
| s | Second in minute | Number | 55 |
| S | Millisecond | Number | 978 |
| u | Day number of week (1 = Monday, ..., 7 = Sunday) | Number | 1 |
| w | Week in year | Number | 27 |
| W | Week in month | Number | 2 |
| X | Time zone | ISO 8601 time zone | -08; -0800; -08:00 |
| y | Year | Year | 1996; 96 |
| Y | Week year | Year | 2009; 09 |
| z | Time zone | General time zone | Pacific Standard Time; PST; GMT-08:00 |
| Z | Time zone | RFC 822 time zone | -0800 |
Pattern letters are usually repeated, as their number determines the exact presentation.
Within date and time pattern strings, unquoted letters from 'A' to 'Z' and from 'a' to 'z' are interpreted as pattern letters representing the components of a date or time string. Text can be quoted using single quotes (') to avoid interpretation. "''" represents a single quote. All other characters are not interpreted; they're simply copied into the output string during formatting or matched against the input string during parsing.
Below are some examples to display how different datatypes and types can be used within Push notifications:
<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>some Date</Display> <DataType>Date</DataType> </Field> <Field> <Name>field2</Name> <Display>GraceMoney 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="DaysToMaturity" TYPE="FUNCTION" DATATYPE="Decimal">DaysDiffOf(RequiredMV, ActivityEffDate)</MathVariable> <MathVariable VARIABLENAME="BigTextMV1" TYPE="FIELD" DATATYPE="BIGTEXT">Activity:TextArea1</MathVariable> <MathVariable VARIABLENAME="PolicyCurrency" TYPE="FIELD" DATATYPE="CURRENCY">Activity:GraceMoney</MathVariable> <MathVariable VARIABLENAME="payerName" TYPE="VALUE" DATATYPE="TEXT">Chris Snow</MathVariable> <MathVariable VARIABLENAME="isReBill" TYPE="VALUE" DATATYPE="BOOLEAN">false</MathVariable> </MathVariables> </Math> </Transaction>
<PushNotifications> <PushNotification EVENTNAME="Billing"> <Message ID="BillingMsg1"> <Tests> <Test>1=1</Test> <Test>1=1</Test> </Tests> <AsEventMessage xmlns="http://xmlns.examplealarmere.com/PAS/AsEventMessage"> <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="EFFdate">Activity:EffectiveDate</Parameter> <Parameter DATATYPE="Decimal" NAME="DM">DaysToMaturity</Parameter> <Parameter DATATYPE="CURRENCY" NAME="PolicyCurrency">PolicyCurrency</Parameter> <Parameter DATATYPE="FORMATDATE" NAME="EVENTDATETIME">EventDateTime</Parameter> <Parameter DATATYPE="FORMATDATE" NAME="ActivityEffectiveDate">ActivityEffectiveDate</Parameter> <Parameter DATATYPE="Text" NAME="ActivityGUID">Activity:ActivityGUID</Parameter> </Parameters> <Billing> <Reversal>[REVERSAL]</Reversal> <BigTextMV1>[BigTextMV1]</BigTextMV1> <payerName>[payerName]</payerName> <isReBill>[isReBill]</isReBill> <EffectiveDate>[EFFdate]</EffectiveDate> <DaysToMaturity>[DM]</DaysToMaturity> <PolicyCurrency>[PolicyCurrency]</PolicyCurrency> <ActivityGUID>[ActivityGUID]</ActivityGUID> <ActivityEffectiveDate>[ActivityEffectiveDate]</ActivityEffectiveDate> <EventDateTime>[EVENTDATETIME]</EventDateTime> </Billing> </JSTLMessage> </AsEventMessage> </Message> </PushNotification> <OnPushFailure> <RollbackTransaction>Yes</RollbackTransaction> <CreateBusinessError>Yes</CreateBusinessError> </OnPushFailure> </PushNotifications>
Output Message:
"<AsEventMessage xmlns="http://xmlns.exampleabc.com/PAS/AsEventMessage"> <Billing> <Reversal>false</Reversal> <BigTextMV1>MyTest</BigTextMV1> <payerName>Chris Snow</payerName> <isReBill>false</isReBill> <EffectiveDate>Fri Dec 01 00:00:00 GMT 2023</EffectiveDate> <DaysToMaturity>0.0</DaysToMaturity> <PolicyCurrency>710.0USD</PolicyCurrency> <ActivityGUID>21F29127-EF75-4167-8DB5-3B90E1978A37</ActivityGUID> <ActivityEffectiveDate>2023-W48-2023</ActivityEffectiveDate> <EventDateTime>2024-W20-2024</EventDateTime> </Billing> </AsEventMessage>"
Some more examples with different Types and Datatype combinations below.
MathVariables:
<MathVariable VARIABLENAME="DECIMALFIELD" TYPE="FIELD" DATATYPE="DECIMAL">Activity:PaymentAmount</MathVariable>
<MathVariable VARIABLENAME="DECIMALExpression" TYPE="EXPRESSION" DATATYPE="DECIMAL">DECIMALFIELD*2</MathVariable>
<MathVariable VARIABLENAME="INT" TYPE="VALUE" DATATYPE="INTEGER">30</MathVariable>
<MathVariable VARIABLENAME="DECIMALVALUE" TYPE="VALUE" DATATYPE="DECIMAL">1.1</MathVariable>
<MathVariable VARIABLENAME="A" TYPE="FIELD" DATATYPE="DATE">Activity:SomeDate</MathVariable>
<MathVariable VARIABLENAME="B" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable>
<MathVariable VARIABLENAME="DaysToMaturity" TYPE="FUNCTION" DATATYPE="DECIMAL">DaysDiffOf(A, B)</MathVariable>
Parameter definition:
<Parameter DATATYPE="DECIMAL" NAME="DECIMALFIELD">DECIMALFIELD</Parameter>
<Parameter DATATYPE="INTEGER" NAME="INT">INT</Parameter>
<Parameter DATATYPE="DECIMAL" NAME="DECIMALVALUE">DECIMALVALUE</Parameter>
<Parameter DATATYPE="DECIMAL" NAME="DECIMALExpression">DECIMALExpression</Parameter>
<Parameter DATATYPE="TEXT" NAME="True">True</Parameter>
<Parameter DATATYPE="DECIMAL" NAME="DaysToMaturity">DaysToMaturity</Parameter>
<Parameter DATATYPE="DECIMAL" NAME="DaysToMaturity">DaysToMaturity</Parameter>
<Parameter DATATYPE="DATE" NAME="VarA">Activity:SomeDate</Parameter>
<Parameter DATATYPE="DATE" NAME="VarB">B</Parameter>
JSTL Message:
<DECIMALFIELD>[DECIMALFIELD]</DECIMALFIELD>
<INT>[INT]</INT>
<True>[True]</True>
<DECIMALExpression>[DECIMALExpression]</DECIMALExpression>
<DECIMALVALUE>[DECIMALVALUE]</DECIMALVALUE>
<DaysToMaturity>[DaysToMaturity]</DaysToMaturity>
<Field1>[VarA]</Field1>
<Field2>[VarB]</Field2>
Error messages for Downstream message push:
Error messages:
-
If the EVENT value in PushNotifications does not match with any EVENT NAME value in DownstreamMessagePushDefinition the below error gets displayed.
Unable to send message to the outbound server: EVENT in PushNotifications is not found in downstreammessagepushdefinition:EVENT/MSGID
-
If messages from multiple events in the PushNotifications fails due to ENV value mismatch between pas properties and DownstreamMessagePushDefinition, multiple errors one for each EVENT will get displayed.
-
If ENV value in pas properties does not match with ENV value in DownstreamMessagePushDefinition then the below message gets displayed.
Unable to send message to the outbound server: ENV value mismatch between pas properties and DownstreamMessagePushDefinition: EVENT
-
If messages from multiple events in the PushNotifications fails due to ENV value mismatch between pas properties and DownstreamMessagePushDefinition, multiple errors one for each EVENT will get displayed.