Migration of custom FESI extensions to the IBM JSEngine
Migration of a custom FESI extension to a script extension makes your code shorter, easier to read, and easier to understand. Support for FESI is deprecated in ISIM Version 6.0. For detailed information and examples about how to write new extensions, obtain a copy of the extensions.zip file. Do these steps:
- Log on to ISIM virtual appliance console to open the Appliance Dashboard.
- From the top-level menu of the Appliance Dashboard, select Configure > Advanced Configuration > Custom File Management to display the Custom File Management page.
- Click the All Files tab.
- Go to directories/utilities.
- Select extensions.zip and click Download.
- Extract the extensions.zip file.
- See the documentation in /extensions/doc/javascript/javascript.html.
The following example illustrates the migration steps.
- Best practice in handling function returns
We can minimize problems that might occur due to differences in how FESI and IBM JSEngine handle JavaScript. The differences involve implicit return values from functions.- Plain Old Java Object (POJO) example
Start with a Plain Old Java™ Object (POJO, in this example) that contains all of the business logic for your extension.- Conversion to a script extension
When you convert a FESI extension to a script extension, the root of a script extension is the ScriptExtension interface.- Creation of a constructor
To create a constructor, use ContextItem and the createConstructor method.Parent topic: JavaScript extensions overview