Purpose

Code Wizard is a powerful Encompass Plugin that facilitates the writing of business rules by providing syntax highlighting, error checking, autocomplete, autoformat, loan simulation, and a library of common functions. It can help Encompass Administrators as their code grows and becomes more complex to meet business requirements.


Activation

1.    Installation of the Code wizard tool is done through the Toolshed Plugin under the Expert and above tiers.  Ensure that the Code Wizard tool is licensed through Toolshed before continuing.
2.    To activate the plugin, in the ToolShed Settings window, turn the Code Wizard on and obtain license code.


3.    ToolShed will download and install the current version of the package.
4.    Restart Encompass to complete the installation.


Instructions for Use

1.    The installation adds a Code Wizard button when there is custom field code, rule filter code, or advanced code in a business rule.


2.    Clicking the button opens the Code Wizard editor. 
        It is strongly recommended to have a loan open prior to launching the Code Wizard, some features may not be available without a loan open.
3.    Below is a screenshot of the Code Wizard for a filter on a Trigger rule.


4.    The left pane shows the code for the filter or advanced code
       The right pane displays the current loan values for fields used in the code.
       It also can be used to test the code, look up the syntax for functions, find other custom code in Encompass, and to simulate the code without changing the actual loan data.
5.    The code in the left pane is the actual code for the field or rule.  Changes to this code will be saved to the field or rule.
6.    Click the “Auto Format Code” button to auto-indent the code, making it easier to understand the logic, branching, and nesting.
7.    After making changes, click “Check for Errors” to look for misspellings, missing or extra parentheses, etc.  Leave Strong Check selected, but only use Strict Check if working with SDK/PlugIn code.
8.    After configuring code, click “Test” to simulate how the code would run and the results for the current loan data.


9.    Use the “Simulator” tab to change loan field values and test various scenarios of the code.
       NOTE: These changes are NOT saved back to the loan.  They are only in effect for the testing of the code.
       This feature is a tremendous time saver when testing code that has various options in the field values.  It eliminates the need to open a loan, change one or more values and determine if the code is running correctly.
       After changing values in the top section of the Simulator, click “Run Condition Code” to test the code with the new values.
       Click the “Reset” button to set the Simulator back to the current loan values.
10. Use the “Functions” tab to see available functions and the syntax that can be used in code.  Examples show how the functions can be written to get the desired result.
11. Use the “Other Code” tab to search for other custom field calculations or business rule code if needed.