How to display console results of Java stack in the Outsystems UI

Hi All,


We are trying to build a application wherein we want to showcase results of the console in Integration studio in the OutSystems UI

i.e Java code in the Integration studio will give us some results in the console.
After clicking some button in the Outsystems UI, can there be any action that will trigger & fetch the console result from Integration studio in the UI.

Regards

Saurabh

Hi saurabh khankhoje,

What results are those (which are displayed in the console)?

Regards,

Hi Marco,

Results will have something related to server volumes/space & other parameters .
these get displayed in console like like ,

A - 80%
X - 10%
Y-  30%
Z - 80%

consider A, X, Y , Z as different volume parameters of the application.

We want the same display - 

A - 80%
X - 10%
Y-  30%
Z - 80%


to be printed in the OutSystems UI, what would be the best approach & how can we get these in the UI.


Regards

Saurabh

I have two more questions, where are these results stored and how frequently do they need to be refreshed in the screen? 

1.They wont be stored anywhere, would be dynamic. Example I click Show statistics button on UI
Java integration stack calls the the java code. Java code is executed fetches the result on console (above mentioned).

2.It wont be a refresh as such. User inputs his user id, host etc & clicks button. The action would be triggered only when the button is clicked.

saurabh khankhoje wrote:

1.They wont be stored anywhere, would be dynamic. Example I click Show statistics button on UI
Java integration stack calls the the java code. Java code is executed fetches the result on console (above mentioned).

2.It wont be a refresh as such. User inputs his user id, host etc & clicks button. The action would be triggered only when the button is clicked.

In case you want dinamy results you need

Some steps for you to think on your solution:

  1. Create an OutSystems extension using integration studio (read more here)
  2. Retrieve metric results by extension action result (dinamically or at the end of action):
    • To get CPU usage metrics, for load average per cpu, use this method: OperatingSystemMXBean.getSystemLoadAverage() / OperatingSystemMXBean.getAvailableProcessors()
    • To get memory metrics use: OperatingSystemMXBean.getTotalPhysicalMemorySize() and OperatingSystemMXBean.getFreePhysicalMemorySize()
    • To get metrics of disk space use: File.getTotalSpace() and File.getUsableSpace()
  3. Then present the correspondent results in the screen (static or dinamic by feeding and refreshing the page content)

I hope this helps!

thanks Marco...My application deals with connecting to Unix server to fetch statistics & not the CPU stats.

However, before jumping to that my code is giving me below error while compiling.

Please note that my code runs individually successfully in eclipse version opened by Integration studio. After saving when I Verify it , I get the compiling error as below : 

J2EE Compilation.

Buildfile: C:\Users\*****\AppData\Local\Temp\Integration Studio\LfveLAfAy0yuBYE6mBAz9w\Source\J2EE\build.xml

clean:
  [delete] Deleting directory C:\Users\*****\AppData\Local\Temp\Integration Studio\LfveLAfAy0yuBYE6mBAz9w\Source\J2EE\bin
  [delete] Deleting directory C:\Users\*****\AppData\Local\Temp\Integration Studio\LfveLAfAy0yuBYE6mBAz9w\Source\J2EE\docs

init:

compile:
   [mkdir] Created dir: C:\Users\*****\AppData\Local\Temp\Integration Studio\LfveLAfAy0yuBYE6mBAz9w\Source\J2EE\bin
   [javac] Compiling 7 source files to C:\Users\*****\AppData\Local\Temp\Integration Studio\LfveLAfAy0yuBYE6mBAz9w\Source\J2EE\bin
   [javac] C:\Users\*****\AppData\Local\Temp\Integration Studio\LfveLAfAy0yuBYE6mBAz9w\Source\J2EE\SshConnectionManager.java:32: error: no suitable method found for setConfig(String,String)
   [javac]             session.setConfig("PreferredAuthentications", "publickey,keyboard-interactive,password");
   [javac]                    ^
   [javac]     method Session.setConfig(Properties) is not applicable
   [javac]       (actual and formal argument lists differ in length)
   [javac]     method Session.setConfig(Hashtable) is not applicable
   [javac]       (actual and formal argument lists differ in length)
   [javac] 1 error


BUILD FAILED
C:\Users\*****\AppData\Local\Temp\Integration Studio\LfveLAfAy0yuBYE6mBAz9w\Source\J2EE\build.xml:34: Compile failed; see the compiler error output for details.

Total time: 4 seconds


I am not sure here because the code runs successfully in eclipse however fails when compiling using Verify option in Integration studio.


Regards

Saurabh