Skip to main content

Beanshell vs Javascript

Introduction

Soffid 4 configures the smart engine with the JavaScript engine by default.

Previously, the default engine was Beanshell, and many scripts will need to be adapted.

This page lists these differences.

Table of differences

Topic Beanshell Javascript
variable s = "text"; var s = "text";
function public void doSomething(String system) {
  ...
}
doSomething("APP_USERS");
function doSomething(system) {
  ...
}
doSomething("APP_USERS");
for

for (user : listOfUsers) {

  ...

}

for (var i=0; i<listOgUsers.size(); i++) {
  ...
equals

user == null

user === null
equals

userName.equals("myName")

userName === "myName"
java class

es.caib.seycon.ng.comu.AccountType

Java.type("es.caib.seycon.ng.comu.AccountType")