Three directories are created in the 'CustomCodeWorkingDir'
- survey_customcode
- ruleengine_customcode
- reporting_customcode
Compiled custom code libraries in these directories will be included in the release created via the powershell scripts described in 'Creating a new build' .
Libraries Accessible Through Survey Scripting
Custom code variables can be used to extend the scripting functionality in Forsta Plus surveys. These libraries can be made available for all projects on your site, or restricted to specific projects.
Server-wide Accessible Libraries
If you want some Custom Code Library functions to be available from all surveys across all companies, the Custom Code Library DLLs must be put into the following folder:
survey_customcode\CustomCode
Libraries Available only for Specific Surveys
If you want some Custom Code Library functions to be available only for specific surveys, the Custom Code Library DLLs must be put in the following folder:
survey_customcode\ProjectCustomCode\bin
The ProjectCustomCode folders should contain a config file for all projects that are to use any of the DLLs in the bin directory .config. For example p01234567.config.
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="assemblies" value="projectspecific_v1.dll;common_v3.dll"/>
</appSettings>
</configuration>
This config file should be put in the following directory (the parent directory to the bin directory):
survey_customcode\ProjectCustomCode
Libraries Accessible through Data Processing
If you want Custom Code Library functions to be available from Data Processing Action Scripts, the Custom Code Library DLLs must be put into the following folder:
ruleengine_customcode\RuleEngineCustomCode
Libraries Accessible through Reportal
Custom code libraries can be made available in Reportal, and can help extend the scripting capabilities.
Note: Unlike Survey or Data Processing customer code, where libraries can be available for all projects, Reportal Custom Code must be associated to a Company ID or Report number using a configuration file.
Report Specific Reportal Libraries
If you want Reportal Custom Code Library functions to be available only for specific reports, the Custom Code Library DLLs must be put in the following directory:
reporting_customcode\ReportCustomCode\bin
In addition, the ReportCustomCode folders should contain one config file for each report that is to use any of the DLLs in the bin directory. Report_<reportnumber>.config. For example: Report_3.config, where 3 is the report number for the report you want to give access to the custom code library. The config file should list all Custom Code Library DLLs used by a report, for example:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="assemblies" value="reportSpecificCCL.dll"/>
</appSettings>
</configuration>
If you have more than one assembly you want to access for your specific report, you can separate the assemblies with semicolons (e.g. <add key="assemblies"value=" reportSpecificCCL.dll;common_report.dll "/>).
This config file should be put in the following directory (the parent directory to the bin directory):
reporting_customcode\ReportCustomCode
Company Specific Reportal Libraries
If you want Reportal Custom Code Library functions to be available only for a specific company, the Custom Code Library DLLs must be put in the following folder:
reporting_customcode\CustomerCustomCode\bin
The CustomerCustomCode folders should contain one config file for each company that is to use any of the DLLs in the bin directory. Customer_<companyid>.config. For example: Customer_3.config where 3 is the id of the company you want to give access to the custom code libraries. The config file should list all Custom Code Library DLLs used by a company, for example:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="assemblies" value="reportSpecificCCL.dll"/>
</appSettings>
</configuration>
If you have more than one assembly you want the company to have access to, you can separate the assemblies with semicolons (e.g. <add key="assemblies"value=" reportSpecificCCL.dll;common_report.dll "/>).
This config file should be put in the following directory (the parent directory to the bin directory):
reporting_customcode\ReportCustomCode