While we are dealing with business objects in BAW javascript, we may need to do some comparation between values.

If we are dealing with complex business object and try to compare it in deeper levels it may get a Nullpointer exeption.

Lets say that we have a business object like below.

And we would like to check if address.number is X or not.

First we need to create a db2 connection like below

Then we need to add SSL setting under“Driver properties” tab.

Properties KeyValue Pair:

sslTrustStorePassword => Password of your trust store
sslTrustStoreLocation => Location of your trust store in your local harddrive
sslConnection => true

In on-Prem we were using terminal (if OS is linux) to connect WAS to execute commands. But in on cloud we don’t have access to WAS.

But still we can execute commands like below inside the process app as a javascript command.

If we need to create folder in specific location (which we already have rights) we can execute the commands below in Javascript integration.

var runtime = java.lang.Runtime.getRuntime();
var proc = runtime.exec(“mkdir -p -m 777 /tenant/home/Selcuk”);

This command basically creates a a folder in specific path.

If you need to read/write to anyfile in application you can use the OOB services below.

Read => Read Text File (Service Name in System Data)
Write => Write Text File (Service Name in System Data)