Customization is often required when working with specific business scenarios or as workarounds for support issues. In PROCESSIT, such activities can be performed within the Customization Workbench, where code can be written, tested, and deployed by application and system administrators. Through the Customization Workbench, PROCESSIT exposes various interfaces where code written in Groovy or PLSQL can be implemented.
This article describes the PROCESSIT Customization Workbench and demonstrates how code can be imported, exported, and tested.
How to access the Customization Workbench
To access the Customization Workbench, log in to PROCESSIT as the setup user, click the navigation button on the toolbar, and then click Customization Workbench.
Using the Customization Workbench
The Customization Workbench contains docked windows for the interfaces defined for PROCESSIT. Windows for source code, code implementation, and interface properties also exist.
The INTERFACES section is where the customized code can be implemented. An interface can be viewed as a point in the time within the process of an invoice. Frequently used interfaces include Custom Project Accounting Interface, Custom Code Before Export, and Validate AP Interface.
Below the INTERFACES section is the SOURCE CODE area, which displays the source code that is available and imported for a specific interface.
When source code for an interface is selected, it is displayed in the Source Code tab in the pane to the right.
Each interface offers additional properties, including whether it is active, which source code will be executed, and what language is being used (Groovy or PLSQL).
Importing source code
In order to implement source code, the code can be written directly into the code window, and the syntax can be checked with the Compile button. The customization interface code is dynamic, so compilation is limited to syntax checking, whereas object references are left for runtime.
Code can be either imported or exported. Imported code is usually sourced from an XML file that was exported from another PROCESSIT system. Clicking the Browse button on the PROCESSIT menu bar enables a user to locate an existing Customization Workbench XML. Once the file is located, the Import source button allows the imported source to be imported and aligned to its respective interface.
The source code is then added to the interfaces list.
Save and compile
Saving and compiling is a function of the customization interface buttons. Save allows code edits to be saved, and Compile allows the code to be syntax-checked.
The results of the compilation are seen in the Log pane, located to the right beneath the code.
Testing the source code
The Test Source Code tab allows test code to be generated so the interface can be used to test the implementation. The Run Test button tests the source code and displays the results in the Log pane beneath the code.
Activating the interface and code
To activate the interface, the Enable Interface check box must be selected, and the source code must be chosen from the Use Source Code Name list.
It is advised to also test the code with real invoices. Most custom code uses the PROCESSIT log4j logging utility via setLog statements. Because code within the interface can be written to the PROCESSIT log, problems at runtime can be diagnosed.