10-20-2017 11:06 AM - edited 02-04-2024 2:08 AM
Dear All,
I would like to know if it's possible when I have a new entry in my hana table to send this entry with websocket ?
If yes how to do it ? (Java application or XS app )?
Thanks and regards
Hello Jonathan,
so, based on your additional comments above, the use case you describe is: react on incoming messages from the device (new entries in the table) and then do some action (forward new entry via WS).
First part of the use case reminds me some similar threads [1], [2], [3] from the Community archive. Summarizing those ones, you have basically two options:
As for the second part (forwarding an entry via WS):
Hope this helps.
Regards,
Anton
[1] https://archive.sap.com/discussions/thread/3891613
[2] https://archive.sap.com/discussions/thread/3828005
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anton
I've seen your answer (to use HANA triggers) for this kind of requirement now a couple of time and always wonder how that would actually help to solve the issue.
Sure, when a new record gets inserted into a table, one can call some HANA procedure or change the data, but there is no option to signal the XS/XSA app connected to the HANA instance in this setup.
If I'm following correctly, the only way for the application to notice and react to new records in the table would be to poll the table and look for new entries. Is that correct? Or how else would that work?
Thanks for sharing your approach!
Lars
Hello Lars,
when suggesting Triggers those days, I have been pretty much confident that calling XSJS procedures by Triggers was a part of the hands-on session done by Thomas in one of those firsts openSAP "SAP HANA" courses [1] (late 2013). Now, after watching some of the videos, I couldn't find it. Also, this direct answer [2] from Thomas confirms that I was wrong. My fault.
So, the only way would be to poll the table, as you say. Thanks for correction!
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.