Message Sender
Once messages have been generated by the message engine, the sender engine sends the actual documents attached to the messages based on message sender configurations.
Message sender configurations define if the documents are saved to the database, how they are sent to the recipients, and if copies of the documents are required.
From the Calypso Navigator, navigate to Configuration > Messages & Matching
> Message Sender (menu action refdata.SenderConfigWindow
)
to define message sender configurations.
Contents
- Defining Message Sender Configurations
- Modifying Message Sender Configurations
- Deleting Message Sender Configurations
- Defining Copy Configurations
- Modifying Copy Configurations
- Deleting Copy Configurations
1. Defining Message Sender Configurations
You need to create a message sender configuration that matches a message configuration, then you can configure copies of the documents.
The Sender Config panel is selected by default.
» | Click New to create a new message sender configuration and enter the fields described below. |
» | Then click Save to save your changes. |
Fields |
Description |
|||||||||||||||||||||||||||||||||
Message Status |
Select the message status for which the message will be sent. |
|||||||||||||||||||||||||||||||||
Advice Type |
Select the message type that you want to send for which a message configuration is defined. |
|||||||||||||||||||||||||||||||||
Static Data Filter |
Click ... to select a static data filter to filter the messages processed by the sender engine. You can double-click the Static Data Filter label to define a static data filter. |
|||||||||||||||||||||||||||||||||
Product Type |
Select the product type to which this configuration applies, or ALL. The product type can be a group of products. See Configuration > Product > Group (menu action |
|||||||||||||||||||||||||||||||||
Address Type |
Select the address type. Address type information is then retrieved from the contact. Note that the address type has to be the same as in the message configuration. If you want to send a message to another address type, you can use the Copy Config panel.
|
|||||||||||||||||||||||||||||||||
Gateway |
Select the gateway. Note that the gateway has to be the same as in the message configuration. If you want to send a message to another gateway, you can use the Copy Config panel.
Out-of-the-box, the FILE, DTCC, SFTP and SWIFT gateways are supported. You can implement custom gateways as applicable. Refer to the Calypso Developer’s Guide for details. Gateways are registered in the "gateway" domain. |
|||||||||||||||||||||||||||||||||
Save |
Check the Save checkbox to save the document to the database. You can select Domain Name 'SenderEngineByPassGetLastDocument' to bypass unnecessary API calls. It contains a list of gateway for which SenderEngine does not check the getLatestAdviceDocument. A special value 'ALL' is valid for all the gateway. |
|||||||||||||||||||||||||||||||||
Send |
Check the Send checkbox to actually send the message.
Documents can be sent by address type, by gateway or by JMS through the DocumentSender interface. These checkboxes are used to determine which DocumentSender to use.
Out-of-the-box, Calypso provides the following implementations:
You need to implement the DocumentSender interface for any other sending method. The DocumentSender can apply an action of the message workflow if needed. Refer to the Calypso Developer’s Guide for details and samples. |
|||||||||||||||||||||||||||||||||
Config Id |
Unique id number given by the system when the Sender Config is saved. |
1.1 EMAILDocumentSender
To use EMAILDocumentSender, you must specify your Mail server in a file named calypso_mail_config.properties
. This file should be placed in <calypso home>/tools/calypso-templates/resources/
and deployed to your application servers.
The content of the file should be:
HOST= <HostName or IP address of MailServer>
PORT= <Port Usually 25>
FROM= <from address not mandatory>
The TO email address is the email address of the receiver as defined in the receiver’s contact information, and if the FROM email address is not specified in the property files, it is the email address of the sender as defined in the sender’s contact information.
Note that when you select the EMAIL address type, you should select the PRINTER gateway.
The email subject line and content can be populated using the following property files (the naming of the property files is based on Sender/Receiver/Language):
EmailPDF_<Sender>-<Receiver>-<Language>.properties
Example:
EmailPDF_ALL-AAA BANK-en_US.properties
Content:
Subject= Confirmation From ALL to AAA BANK
Body= Dear Sir/Madam,\nYou will find attached the trade done between you and us. \nPlease confirm that it correctly sets the terms of our agreement by returning it to us signed. \nYou can contact us for any issues at documentation@po1.com
Email:
You can set Language = ALL for all languages, Sender = ALL for all senders, Receiver = ALL for all receivers.
Example:
EmailPDF_ALL-ALL-ALL_properties
Content:
subject=Confirmation From Calypso NY
body=Dear Sir/Madam,\nYou will find attached the trade done between you and us.\nPlease confirm that it correctly sets the terms of our agreement by returning it to us signed.\nYou can contact us for any issues at documentation@po1.com\nBest regards,\nPO1
Email:
The gateway uses the configuration file "calypso_mail_config.properties".
The configuration file handles the following properties:
• | SendAction: The action to apply when a message is sent (default = SEND) |
• | SaveMessage: True to actually apply the action to the message (default = false). |
1.2 GatewayFILEDocumentSender
The FILE gateway allows saving the message to a file.
Sample templates "XML_data_file.txt
" and "EMAIL_data_file.txt
".
It uses the configuration file "resources/calypso_file_config.properties
".
The configuration file handles the following properties:
• | SendAction: The action to apply when a message is sent (default = SEND) |
• | Path: The path to save the file. |
• | MakePath: Tells the gateway to create the directory for the file if it does not exist (default = false). |
• | Overwrite: Allows the gateway to overwrite a file else the message is not sent (default = true). |
• | SaveMessage: True to actually apply the action to the message (default = false). |
You can use the following variables:
• | {id:message} |
• | {version:message} |
• | {string:ext} |
• | {property:file} - To refer to another property defined in “calypso_file_config.properties”. |
• | {property:system} - To refer to system properties as per System.getProperties(). |
• | {property:env} - To refer to environment variables from the OS. |
• | {name:receiver} - Long Name of the receiver. |
• | {name:sender} - Long Name of the sender. |
• | {attr:receiver:attributName} - Attribute value of the attribute attributeName of the receiver. |
• | {attr:sender:attributName} - Attribute value of the attribute attributeName of the sender. |
• | {status} - Status of the message before to be saved and sent. |
• | {messagetype} - Message type of the BO Message. |
• | {messageType:comment} - Comment specified in domain "messageType" if any, for the message type of the message. |
• | {date:effective:yyyyMMddHHmmssSSS} - Effective Date of the message. The format type is optional. |
• | {productfamily:trade} - Product family of the trade. |
• | {producttype:trade} - Product type of the trade. |
• | {producttype:message} - Product type of the message. |
{id:message} and {version:message} accept an optional integer argument to define the minimum of digits (e.g. for a message version 1, %{version:message:4} becomes 0001).
# Action applied by the gateway (default = SEND)
SendAction=SEND
SaveMessage=true
# Overwrite existing files? (default = true)
Overwrite=false
# Create path to file if necessary? (default = false)
MakePath=true
# Let's create a property for the base directory
# where we will put our files.
CalypsoDir=%{property:system:user.home}%{property:system:file.separator}Calypso
MessageDir=%{property:file:CalypsoDir}%{property:system:file.separator}Messages
# Let's create a path specific to HTML messages
# using the CalypsoDir property that defined above.
HTMLPath=%{property:file:MessageDir}%{property:system:file.separator}Message-%{id:message}-%{version:message:4}-%{code:receiver}-%{date:update}.%{string:ext}
# All other messages will use this path.
Path=%{property:file:MessageDir}%{property:system:file.separator}File-%{id:message:8}-%{version:message}-%{code:receiver}-%{date:creation:yyyyMMddHHmmssSSS}.%{string:ext}
Ⓘ [NOTE: Customized resource files need to be copied to <calypso home>/tools/calypso-templates/resources/
. You will then need to deploy the files to your applications servers]
1.3 GatewayJMSDocumentSender
A property file must be defined for each JMS queue added to the domain "GatewayJMS", with a file name like: calypso_<JMS Name>_config.properties
.
To use a JMS Gateway in binary mode instead of text mode, you need to add isBinary=True in the properties file.
Example: calypso_JMS1_config.properties
# Import Message Engine (MQ)
input.queue.name=dynamicQueues/input1
dynamicQueues/input.queue.setContext=true
# Sender Engine (JMS)
#For ActiveMQ
jms.url=tcp://localhost:61616
jms.modetypeclass=org.apache.activemq.jndi.ActiveMQInitialContextFactory
jms.queue.connectionFactory=ConnectionFactory
#For IBMMQ
#messagingPlatform=IBMMQ
#jms.url=file://localhost/c:/tools/ibm/mqs/binding
#jms.modetypeclass=com.sun.jndi.fscontext.RefFSContextFactory
#jms.queue.connectionFactory=QueueConnectionFactory
output.queue.name=dynamicQueues/output1
dynamicQueues/output.queue.ackType=auto
dynamicQueues/output.queue.persist=true
dynamicQueues/output.queue.transacted=false
Properties=TenantId,SourceSystemName,AssetClass
TenantId=<tenant id>
SourceSystemName=Calypso
AssetClass=Calypso_IR_Intraday
#IBM SSL Support
#sslVersion=SSLV3
#sslKeystore=<KeyStore certificate>
#sslKeystorePassword=<KeyStore Password>
#sslTrustStore=<TrustStore Certificate>
#sslTrustStorePassword=<TrustStore Password>
1.4 GatewaySFTPDocumentSender
The SFTP gateway allows sending and receiving files from a remote location using the SFTP/FTP protocol.
You need to configure the SFTP details in the “calypso_sftp_config.properties
” file provided in <calypso home>/client/resources
.
It is mostly used in the context of DTCC – Please refer to Calypso DTCC SFTP Connection documentation for details.
Ⓘ [NOTE: Customized resource files need to be copied to <calypso home>/tools/calypso-templates/resources/
. You will then need to deploy the files to your applications servers]
2. Modifying Message Sender Configurations
All existing configurations are loaded by default.
» | Select a configuration, and modify the fields as needed. |
» | Then click Save to save your changes. |
3. Deleting Message Sender Configurations
All existing configurations are loaded by default.
» | Select a configuration, and click Remove. |
Any existing copy configuration will be removed as well.
4. Defining Copy Configurations
Select the Copy Config panel to configure copies of documents. You can send copies to contacts of the sender, of the receiver, using a different type of message, using a different sending method, etc.
» | Select a message sender configuration from the lower table to select what document you want to copy. |
Then click New, and enter the fields described below to specify the recipients of the copy and how the message is copied.
» | Then click Save to save the copy configuration for the selected message sender configuration. |
The copies are sent through their own DocumentSender provided Save is not checked in the Sender Configuration. If Save is checked in the Sender Configuration, copies can only be sent if the DocumentSender of the Sender Configuration takes care of sending the copies as well.
See Copy Sending Logic for details.
Note that the copies are never saved.
Fields |
Description |
Sender |
Check the Sender checkbox to copy messages to a specific sender. Click ... to select the sender. |
Receiver |
Check the Receiver checkbox to copy messages to a specific receiver. Click ... to select the receiver. |
Static Data Filter |
Click ... to select a static data filter to filter the messages to be copied. You can double-click the Static Data Filter label to define a static data filter. |
Sender Contact Role |
Only applies if you have checked the Sender checkbox. Select the sender role to which you want to copy messages, or NONE. |
Sender Contact Type |
Only applies if you have checked the Sender checkbox. Select the sender contact to which you want to copy messages, or NONE. |
Receiver Contact Role |
Only applies if you have checked the Receiver checkbox. Select the receiver role to which you want to copy messages, or NONE. |
Receiver Contact Type |
Only applies if you have checked the Receiver checkbox. Select the receiver contact to which you want to copy messages, or NONE. |
Advice Type |
Select the message type of the copy. |
Address Type |
Select the address type of the copy. |
Format Type |
Select the format of the copy. Out-of-the-box, the DTCC, HTML, TEXT, TRAX, SWIFT and XML formats are supported. You can implement custom types of formatters as applicable. Refer to the Calypso Developer’s Guide for details. Format types are registered in the formatType domain. |
Gateway |
Select the gateway of the copy. |
Language |
Select the language of the copy. Note that currently, the system does not use this setting. In the current version of Calypso, you should make sure that you use a template written in the desired language. |
Template |
Click ... to select a message template. Defining document templates is described under Help > Message Template Keywords.
A number of document templates are provided out-of-the-box under Swift templates are registered in the domain “SWIFT.Templates”.
|
Copy By JMS |
For the JMS gateway, you can check the "Copy By JMS" checkbox if you want to use multiple JMS channels to copy the message, and select the JMS queue from the JMS Name field. The available queues must be defined in the domain "GatewayJMS" and property files must be defined for each JMS queue as described above. |
Copy By Gateway |
Check the “Copy By Gateway” checkbox to copy the message, and send it using the gateway. |
Copy By Method |
Check the “Copy By Method” checkbox to copy the message, and sent it using the address type. |
4.1 Copy Sending Logic
When you configure a Sender Configuration with Copy Configurations, the logic is the following.
1 – The system creates the main document of the Sender Configuration.
2 – The system creates the copies of the Copy Configurations.
3 – The rest depends on checkboxes Send and Save:
• | If only Send is checked – The system sends the main document through the DocumentSender of the Sender Configuration, and sends the copies through their own DocumentSender as defined in the Copy Configuration. |
• | If only Save is checked – The system saves the main document – Nothing is done on the copies. |
• | If both Save and Send are checked – The system sends and saves the main document. The copies can only be sent if the DocumentSender of the Sender Configuration takes care of sending them. |
• | If both Save and Send are NOT checked – The system sends the copies through their own DocumentSender as defined in the Copy Configuration. |
5. Modifying Copy Configurations
Select the Copy Config panel.
» | Select a message sender configuration from the lower table. All corresponding copy configurations will be loaded. |
Select a copy configuration and modify the fields as applicable.
» | Then click Save to save your changes. |
6. Deleting Copy Configurations
Select the Copy Config panel.
» | Select a message sender configuration from the lower table. All corresponding copy configurations will be loaded. |
Select a copy configuration and click Remove.