How can I write in entity records on Java stack extension?

How can I write in entity records on Java stack extension?

  

I imported an entity into my extension via connecting to external table,which also belongs to outsystems database.

Now I want to write records into the entity.

How can I manage to do that?

BTW. what's the difference between entity class and record class defined in Java?

Hi Alex,

You don't necessarily need to use extension actions for that end...

If I understood correctly, you already have your entity referenced in your extension.

From that point on you should be able to consume it in your modules like a normal OutSystems table (given you have configured a primary key).



João Heleno wrote:

Hi Alex,

You don't necessarily need to use extension actions for that end...

If I understood correctly, you already have your entity referenced in your extension.

From that point on you should be able to consume it in your modules like a normal OutSystems table (given you have configured a primary key).



Thanks for your reply.But here is the situation. I used a 3rd-party Java stack SDK to receive message via websocket.

The message received only in extension,but our business logic in module needs to react with it in real-time.

So I figured it out if I can insert data in extension.I'll enable to react with the message through using the Launch On(eg. CreateEntity) of Process to monitor database changes.

If you have any better idea,please tell me freely.

João Heleno wrote:

Hi Alex,

I see now...

You can try using the RuntimePublic.Db API -> https://success.outsystems.com/Documentation/10/Reference/OutSystems_APIs/RuntimePublic.Db_API

Take a look also at the examples:

https://success.outsystems.com/Documentation/10/Reference/OutSystems_APIs/RuntimePublic.Db_API/Insert_Data_in_the_Application_Database

https://success.outsystems.com/Documentation/10/Reference/OutSystems_APIs/RuntimePublic.Db_API/Query_Data_from_an_External_Database


Cheers,

João Heleno



Hey man.Thanks a lot.

It works.

However the official doesn't offer a Java demo.

Plus if the solution support across environment(from dev to pro)?