Page tree

Perl based Scripts

Using Custom Scripts

Agiloft provides a custom scripting capability that is a powerful tool for validating data, automating business processes and integrating with other back-end programs.

Scripts may be created in any standard programming language such as Perl, Java, C++, or Basic and run by Business Rules at Setup > Rules or Workflows at Setup > Workflow. These wizards tell you in which directory on the server the script must be placed. For security reasons, it is not possible to upload the script to the server using the GUI; the script must be installed directly on the Unix or Windows file system.

If you would like to use your own Perl distribution with scripts rather than the default distribution, you can define the location of your preferred perl.exe using the Location of external Perl directory global variable. For example, you might set it to c:\Perl64\bin.

Scripts can:

  • Set field values in the record. For example, a script can apply sophisticated logic to automatically assign new Cases to the correct member of staff.
  • Logout the user and redirect his or her browser to a specific URL.
  • Verify the data being entered by comparing it against data in an external file or database and, if necessary, block the requested change to the record.
  • Write to an external program or file or generate email.
  • Return personalized messages based on field values, such as "Hi Bob, thank you for the input"
  • Accept or reject changes to the record made by the user.

Scripts are provided with the following information:

  • Field values of the record that is being modified. For example, Severity.
  • Field values that record held prior to the current modification. For example, the old value of Severity.
  • Field values from the Contacts table of the user who is modifying the record. For example, Full Name.
  • Field values of any records that are linked to the record that is being modified. For example, the Full Name of the person that the record is currently Assigned To.
  • Global variables, such as the name of the KnowledgeBase.
  • Modification event source. The possible values are: WEB_WORKFLOW, WEB_BUSINESS_RULE, EMAIL, API, TIMER_BUSINESS_RULE.