"Shelling" out to run a command line from Rollbase

Posted by jbeisch on 05-May-2014 09:20

Is it possible via something in Rollbase itself or in JScript to shell out to the OS Rollbase is hosted on in a private cloud and run command line commands?  If so, what user does it run as?

I am assuming this can be done in some way in a workflow/trigger by shelling out inside of JavaScript but don't know enough to know that is truly possible.  Also, since these are all running in Tomcat, I'd assuming the "shell out" would run as the user Tomcat is running as.

What we are looking to do is to allow users to "refresh" their hosted files from one server/customer to another.  We have a development zone and a "production" zone. 

I do understand hosting the hosted files on Amazon or Azure is an option but still need to know if this can be done.  Thanks.

Posted by egarcia on 05-May-2014 09:48

Hello,

I do not think that there is an API in Rollbase to do that.

(I could not find in the Rollbase In Action book with a quick look. Also, an API like this in a cloud environment would be a potential security risk.)

However, if this is something that would improve your private cloud application (based on your code and security requirements), then you could use a technique where you can add Java classes to Rollbase and invoke them from JavaScript.

See the following links for information on this technique:

community.progress.com/.../34803.aspx

community.progress.com/.../69.aspx

I hope this helps.

All Replies

Posted by egarcia on 05-May-2014 09:48

Hello,

I do not think that there is an API in Rollbase to do that.

(I could not find in the Rollbase In Action book with a quick look. Also, an API like this in a cloud environment would be a potential security risk.)

However, if this is something that would improve your private cloud application (based on your code and security requirements), then you could use a technique where you can add Java classes to Rollbase and invoke them from JavaScript.

See the following links for information on this technique:

community.progress.com/.../34803.aspx

community.progress.com/.../69.aspx

I hope this helps.

Posted by jbeisch on 05-May-2014 12:13

Many thanks Edsel.  Looks like I could probably uses something like "node.js" and include it in the libraries Rollbase can see and JavaScript calls to it to "shell execute" on the server side.

Posted by Bill Wood on 13-May-2014 19:43

There is the security issue in a hosted environment, where the JavaScript engine is sandboxed, but you should be able to do this in private cloud by enabling access to appropriate Java classes.   I have not done this with your specific case of creating a shell, but you can enable any Java class.

Their is a whitepaper that describes calling OpenClient java classes, but it works for any Java, not just OpenClient.   See this whitepaper.

This thread is closed