Part I of this subject provided theoretical information as to how “common.js” can be used to increase reusability for pre/post scripts of the Savvion BPM process template. Below are guidelines and a detailed approach to using “common.js”.
Design/Implementation of “common.js” approach
1). Look for “common.js” file in “<%SBM_HOME %> /BizLogic” location.
2). If it is not available create a new file.
3). If it is available, edit the same file.
Refer to the below snapshot for implementation logic for Section 1.
Common functions used at multiple pre/post scripts – This section will contain those common functions which are required to be used for multiple pre/post scripts.
Refer to the below snapshot for implementation logic for Section 2.
Activity wise implementation of the prescript/postscript functions – This section will contain the actual implementation of the pre/post script functions.
Refer to the below snapshot for implementation logic for Section 3.
As “common.js” is shared across all the process templates deployed on SBM Server, the merging and managing of the common.js must be done manually. This must not be kept as part of the “CommonResourcesProject”.