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.
Related objects
- Smart engine settings : where the engine is configured.
- Where we can use scripts:
- Agents
- Custom scripts
- Account naming rules
- Role assignment rules
- BPM editor
- Password policies
Table of diffences
| 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" |