top of page

Tip #9: Communication Server

SimCorp has many useful features and none are more flexible than the communications server. The communications server allows us to connect to data providers or counterparties, but it can also be a great tool even if not connecting to an external vendor or server. This post will focus on some tasks that, without using the communications server, may be difficult or impossible.


How can we get data into a communications server?

While there are several options, one of the cleanest ways is to use an extraction setup. Most users are familiar with sending data to a user-defined table or message queue and the third tab ‘Communication Server’ remains a mystery. To use this first define a ‘Configurable Message Types’ of type Extract data – Point-2-Point.

Then on the Extraction Setup on the communication server tab link to this message type and add a message label of the form SCOut_Extract_xxxx with a format of Xml-data. For this example, the label I chose is SCOut_Extract_Test.

Then, on your communication server setup add this message type and make sure it is active.

Lastly, in one of the cartridge files, you need to define a handler in the SCOut port that has the label defined above.



<cartridge Version="1.0">

<inputport port="SCOut">

<handler label="SCOut_Extract_Test" output="message">

ADD CODE HERE

</handler>

</inputport>

</cartridge>


Now, whenever the above extraction setup is carried out, the results will go to this handler, and whatever code you have added will be executed.



What tasks can we execute?

A better question: is there anything we could not execute? In fact, since now we have access to xslt and even external DLLs we can manipulate data in any way we wish. Let's look at a few examples:


Data Import

For years linking an Auxiliary Job to an extraction setup and then to a DFS has been a common way to update security master data whenever a transaction is saved. Unfortunately, more and more clients are using Trade Manager, and calling a data import directly from an extraction setup is not possible. You can, however, access a data import queue from the communications server using the SCIn port with the label SCIn_DMImportQueue.


<send input="commandXML" port="SCIn" label="SCIn_DMImportQueue" />


Difficult Queries

For any SQL gurus you know some things can be done in SQL that are either impossible to do with the data extractor or too complicated to be practical. Most Analytic SQL functions like LAG or LEAD are not available via the data extractor, and new installations of SimCorp have the advanced data extractor module disabled. The communications server gives us another option. Using an extraction setup, we can instead send a larger, more raw data set to the communications server and use xslt to group or manipulate our data. From there, data can be sent to a file location just as you would have done if using the extracts exporter module.


Create a word document

This one is quite tricky, but it is useful to know what is possible. Using extracts exporter, we are limited to only a few file-pure data types that can be saved. This is not always what a client wants.


A word document at its core is saved in an xml structure. To see this, try taking any word document and changing the extension from .docx to .zip. Then open the zip file and view what is inside. You should find a file word/document.xml which is how the data is saved. Recreating this structure in the communications server means we could make MS word reports.


Execute a batch job group

For users that are forced to use the communications server, but don’t want to, this one may be the most useful. This way, we can leave the communications server and get back to batch job groups that most find more familiar. Sending an input XML to port SCIn with the label SCIn_BatchQueue will place a batch job group (specified in the input) on a batch queue.


<send input="BatchQueueCommand" port="SCIn" label="SCIn_BatchQueue" />


Conclusion

While this post may have raised more questions than it has answered, hopefully, after reading users can see just how useful and powerful the communications server can be.

Please be sure to check out more dimensional community posts or contact us to find out more about who Dimensional Community is and what we can do for you.

BE THE FIRST TO KNOW

Subscribe and never miss a blog!

Thanks for subscribing!

bottom of page