BPM Process architecture and design must consider following for development plan:
- Maximum reusability of the components
- Avoid the deployment of the entire BPM Process (.spt) resources as much as possible.
- Savvion Common Resources Project helps address above two points in the areas like custom adapters java code, third party integration code, common logger, property readers and so on.
One can address such design requirement using common.js” as explained below:
– Introduction to “common.js”
- “common.js” is the server side java script file which server loads at the time of Bizlogic Server startup from “<%SBM_HOME %> /BizLogic” location.
- If any syntax error available in “common.js” file, server startup will be fail and the logs will have information on the syntax error(s).
- By default “common.js” file will not be available in the SBM installation directory. So if design approach requires “common.js” file to be used, one needs to create a new file with the name as “common.js” and place it at “<%SBM_HOME %> /BizLogic” location.
- All the out of the box functions available for post/pre script (For example: jst.putDataslot, jst.getDataslotValue, etc.) are available to be used inside “common.js” file.
- “common.js” file will be shared across all the applications deployed on the SBM server.
- At the time of redeployment, a special care must be taken for such approach as it is shared across the process templates deployed on SBM server.
- Any change to this file requires to restart Bizlogic server in order to take effect.
- Reusability of the common functions used across the multiple pre/post scripts
- Java script Code will be cleaner.
- The maintenance of the code will be far easier.
- Change to the common function requires to be updated at one place only – This reduces the chances of defects.
- If process requires only post/pre script modification, this approach does not require to refresh the process template. This can be achieved only by replacing the “common.js” file and server restart.
This is the most powerful feature about “common.js” approach.
Most of the times in production environment, stake holder likes to avoid the entire BPM process (.spt) deployment (Refresh the .spt) for any change in pre/post script.
In such scenarios, “common.js” approach is really helpful to avoid the risk factor while making the changes to post/pre script of the BPM Process.
In next Blog we will get into more details about how to develop and use “common.js” file.