Book Image

Intelligent Document Capture with Ephesoft, Second Edition - Second Edition

Book Image

Intelligent Document Capture with Ephesoft, Second Edition - Second Edition

Overview of this book

Table of Contents (14 chapters)

Scripting


Ephesoft can be configured to execute custom Java code in four places:

  • In the workflow (at specific pre-defined points in Ephesoft's processing of a batch)

  • When fields change in validation

  • When an operator presses a function key

  • Periodically at a configurable time

This code can manipulate the documents, populate field values, integrate with external systems, normalize data, and so forth.

The workflow scripts

The MailroomAutomationTemplate batch class, which we copied to create our custom batch, is configured with hooks to execute your own code in several places. For instance, if you want to perform a custom operation prior to validation, you can edit the following file: BC99/scripts/ScriptExtraction.java.

This file contains the implementation of a class named ScriptExtraction. Whenever Ephesoft's extraction module runs, it will call the execute method of this class:

public class ScriptExtraction implements IJDomScript {
  public Object execute(Document jdomObj, String methodName, String...