Академический Документы
Профессиональный Документы
Культура Документы
EMC Corporation
Corporate Headquarters
Hopkinton, MA 01748-9103
1-508-435-1000
www.EMC.com
Legal Notice
Copyright
EMC believes the information in this publication is accurate as of its publication date. The
information is subject to change without notice.
THE INFORMATION IN THIS PUBLICATION IS PROVIDED AS IS. EMC CORPORATION
MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WITH RESPECT TO THE
INFORMATION IN THIS PUBLICATION, AND SPECIFICALLY DISCLAIMS IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Use, copying, and distribution of any EMC software described in this publication requires an
applicable software license.
For the most up-to-date listing of EMC product names, see EMC Corporation Trademarks on
EMC.com. Adobe and Adobe PDF Library are trademarks or registered trademarks of Adobe
Systems Inc. in the U.S. and other countries. All other trademarks used herein are the
property of their respective owners.
Table of Contents
Contents
1
SCOPE ............................................................................................................................................................ 4
OVERVIEW ..................................................................................................................................................... 4
1 SCOPE
The goal of this document is to help clarify the various forms of scripting available in the
Captiva 7.x release. The scripting support in C7 is a result of an evolution in scripting
models, including some new forms of scripting as well as some legacy models. This mixture
of old and new has led to some confusion which this white paper will help clarify. This white
paper is not a replacement for the documentation, nor will this white paper give concrete
scripting examples, but it will help the reader to sort out the differences and capabilities of
each form of scripting and set the reader on the right path.
2 OVERVIEW
Fundamentally there are two forms of scripting. One form is related to client modules and
runs in conjunction with the task that is processed by that module. This form of scripting is
very specific to a particular client module, as the scripting API allows interaction with that
modules data objects and behaviors which are unique to that module. Examples of this
form of scripting are Profile Scripting, Client Scripting, and Recognition Scripting.
The other form of scripting is related to CaptureFlow processing. It is not related to any
particular module, but instead is a means to enhance the ability of the CaptureFlow to apply
complex logic to the processing of the batch through actual code written by the CaptureFlow
developer. Depending on the requirements, this form of scripting can be added directly into
the CaptureFlow and will run on the InputAccel Server (IA Server), or for more demanding
applications the scripting can run on any client machine as a generic step in the
CaptureFlow. Examples of this form of scripting are CaptureFlow Scripting and .NET Code
Module Scripting.
All of these various forms of scripting will be further explained in this white paper.
ScanPlus/RescanPlus
IndexPlus (deprecated)
NuanceOCR
Documentum Advanced Export
Web Services Input/Output
Each of these client modules supports the general QuickModule Client Scripting API (with a
few exceptions for ScanPlus/RescanPlus) as well as module-specific APIs to further
customize the module behavior. Below are the namespaces for each module:
Module
Scripting Namespace
ScanPlus/RescanPlus
Emc.InputAccel.ScanPlus.Scripting
IndexPlus (deprecated)
Emc.InputAccel.IndexPlus.Scripting
NuanceOCR
Emc.InputAccel.NuanceOCR.Scripting
Emc.InputAccel.DocumentumExport.Scripting
Emc.InputAccel.WebServices.Scripting
Emc.InputAccel.QuickModule.ClientScriptingInterface
Script Editor
Script Location
Script Name
Documentation
API Reference
Emc.InputAccel.QuickModule.ClientScriptingInterface
Image Processor
Extraction
Captiva Desktop
As new modules are created for Captiva Capture in the future, each will be evaluated to
determine if it could benefit from some form of Profile Scripting, possibly resulting in new
scripting APIs being defined for that module. Note that some new modules will not require
scripting extensions. For example, the Standard Export module introduced in Captiva
Capture 7.0 does not utilize Profile Scripting, as the module behavior is already sufficiently
configurable through conditional behaviors controlled by expressions defined in the Export
Profile.
Profile Scripting Quick Summary
Languages Supported
Script Editor
Script Location
<or>
ISV.InputAccel.UimScript.dll
Additionally in Captiva Capture 7.1 or later:
Custom.InputAccel.UimScript.<yourname>.dll
NOTE 1: you are still required to have
Custom.InputAccel.UimScript.dll with at least a ScriptMain
class before you can use additional assemblies with the
<yourname> suffix.
NOTE 2: use of ISV.InputAccel.UimScript.dll is intended for
solutions offered by independent software vendors.
EXCEPTION: Custom image processing filters are not really
profile scripts, but a special case and therefore must be created
in an assembly named Custom.ImageFilter.<yourname>.dll
(this is not common) and manually copied to workstations.
Script Scope
Since all module steps of all CaptureFlows will load the same
profile script assembly files, the content of these script files is
globally shared.
However, the code within these script files is written to be unique
for each Document Type (or Super Filter), such that unique
behaviors per step or per CaptureFlow can be achieved through
the use of different Document Type names.
Documentation+Events
API Reference
No*
* While there is no direct access to batch data within Profile Scripting context, it is possible
to provide some batch data to the Profile script through the use of an IA value named
StepCustomValue. This value exists at task level for any module supporting Profile
Scripting, and is a general purpose string which can be uniquely populated per task by the
CaptureFlow. For example, a simple value assignment in the CaptureFlow diagram could
populate it with any desired batch data, or a more just in time approach could be achieved
by populating this value through CaptureFlow Scripting code in the <step>_Prepare event
of the step which will need the data. The Profile Script will then have access to this value
for use in the logic.
Additionally, Profile Scripting offers the ability for the script code to generate and write back
custom data values to the batch. Both the Extraction and Captiva Desktop modules use
the TaskValues dictionary object property which can create dynamic values in the batch.
The Image Processor module can use the outValues dictionary object property on the
ExecuteSuperFilter method to populate existing MDF values in the batch. Please refer to
the documentation for more details on these properties.
3.2.2 Profile Scripting capabilities by module type
3.2.2.1 Image Processor
Note that Profile Scripting for this module is also referred to as Image Processing
Scripting.
3.2.2.2 Extraction
Note that Profile Scripting for this module is also referred to as Document Type Scripting,
or sometimes informally as UIM Scripting.
Extraction uses the same scripting namespace as Captiva Desktop, with the exception that
interfaces relating to the user interface (form and controls) are only accessible from Captiva
Desktop.
Below is a summary of the non-UI interfaces available to both Extraction and Captiva
Desktop.
10
11
Method to
data field
Method to
Method to
Method to
Method to
list box or
Method to
Method to
12
Classification
Classification Edit
Recognition (deprecated)
Validation (deprecated)
For new projects, it is strongly recommended not to use Recognition or Validation modules,
as these are already deprecated and will no longer be shipped with the next Captiva Capture
release. The recommended alternatives are the Extraction and Captiva Desktop modules,
which utilize their own Profile Scripting.
Note: While it may be technically possible to use Recognition Scripting in conjunction with
the newer Extraction module, this is not a recommended practice because the Extraction
module uses a higher-level, document-centric data model which is not well suited to some
of the lower-level scripting events in Recognition Scripting. Please refer to the following
documentation for more details on migrating from Recognition Scripting to Profile Scripting:
Scripting Guide > Profile Scripting > Choosing Between Document Type Scripting
and Recognition Scripting > Mapping of Recognition (Dispatcher) Scripting Events
to Document Type Scripting Events
Use of Recognition Scripting should be limited to the Classification and Classification
Edit modules only. For these modules, Recognition Scripting is primarily used to perform
the following:
Script Editor
Script Location
Script Name
13
Documentation
API Reference
* While there is no direct access to batch data within Recognition Scripting context, it is
possible to provide access to read and write access to specific Level 0, Level 1, and Level 7
values by configuring them in setup mode as external IA values. The Recognition Script
will then have access to these values through the ExternalValues property in the
Dispatcher Object Model. Please refer to documentation for more information on External
Values.
Additionally, all field values can optionally be written back to the batch as discrete IA values
through a setup option of the Advanced Recognition modules.
14
15
Emc.InputAccel.CaptureClient namespace
The interfaces provided are too numerous to list here, but encompass things such as
batch, node, task, stage file, step definition, tables, and value accessors.
Please refer to documentation for complete list and details in section
Scripting Guide > Profile and Task Scripting API Reference > Namespaces >
Emc.InputAccel.CaptureClient Namespace
Script Editor
Script Location
Script Name
16
Documentation
Scripting Guide > Task Scripting > .NET Code Module Guide
API Reference
Scripting Guide > Profile and Task Scripting API Reference >
Emc.InputAccel.CaptureClient Namespace
Yes
Emc.InputAccel.CaptureFlow namespace
o
17
Script Editor
Script Location
Script Name
Script Scope
18
API Reference
Scripting Guide > Profile and Task Scripting API Reference >
Emc.InputAccel.CaptureFlow Namespace
19
CaptureFlow
Scripting (XPP)
Server
Server
Client
What language?
VBA
Visual C# or
Visual C# or
Access 3rdParty
APIs?
No
No
Yes
Yes
Yes
No (runs in
dedicated step)
Requires Visual
Studio to
write/debug code?
No
No
Yes
20
Profile Scripting: since all three modules which use Profile Scripting use the same
script file named Custom.InputAccel.UimScript.dll, it is important that
multiple developers coordinate their coding efforts. The only code which is
mandatory to be placed in Custom.InputAccel.UimScript.dll is the
ScriptMain class.
Additional document type classes (which extend
Emc.InputAccel.UimScript.UimScriptDocument) and/or super filter classes (which
extend Emc.InputAccel.UimScript.UimScriptFilter) can either be put into the
same Custom.InputAccel.UimScript.dll or, beginning with Captiva Capture
7.1, additional document type classes or image processor super filter classes can be
created by different developers and added to separate, uniquely named DLLs that
follow the naming convention of:
Custom.InputAccel.UimScript.<yourname>.dll
provided the primary DLL exists. For example developer A could create
Custom.InputAccel.UimScript.TaxForms.dll
and developer B could create
Custom.InputAccel.UimScript.InsuranceForms.dll
with each containing different document type/super filter classes. At runtime, the
Extraction, Captiva Desktop, or Image Processor modules will load all of these DLLs.
NOTE: All Profile Scripts are deployed through Captiva Designer. If
multiple developers are using independent copies of Captiva Designer, but
all are connected to the same IA Server, the developers should be careful
to coordinate and deploy only 1 set of common Global Options, such
as the list of Deployment Files and the Recognition Project Shared
Directory. If each developer uploads a different set of Global Options,
each will be overwriting the other. For this reason it is necessary that
only one developer deploys Global Options, or that all developers
maintain the same set of Global Options on their workstations.
Recognition Scripting: since this scripting is part of the DPP file, and only one
person at a time can edit a DPP file, it is best that only one developer at a time work
on any given DPP file.
21
.NET Code Module Scripting: each developer can work on a differently named
.NET Code Module Script file in Visual Studio and upload it to the IA Server through
Captiva Designer. As new scripts are created to be uploaded, the names of those
scripts must be defined in Global Options and therefore care must be taken to
ensure that the Global Options deployed to the IA Server always reflect all of the
Deployment File names.
Question: How can I transition values into and out of the scripting context?
Answer:
For Client Scripting, .NET Code Module Scripting, and CaptureFlow Scripting, the
scripting API offers direct access to IA values anywhere in the batch.
For Profile Scripting, data can be made available to the script either by placing it into
the StepCustomValue, or by pre-populating a field value through the use of
InUimData_<Field> dynamic value.
To get data out of Profile Scripting and available to the CaptureFlow or other module
steps, the output form data can be flattened into dynamic output values per field,
or if the data to be output does not exist in any field, it can be written to any IA
value name (at task level) by adding the value to the TaskValues list object property
in the script code.
For Recognition Scripting, the use of external values can be used to get data in or
out
For Profile Scripting, use Visual Studio and refer to documentation section Captiva
Capture Guide > Scripting Guide > Profile Scripting > Developing Profile
Scripts > Debugging Profile Scripts
22
Set a breakpoint in your source code, and process a task with the module,
and the breakpoint should be reached if the module fires an event which leads
to your breakpoint.
For Recognition Scripting, use the IDE integrated into Recognition Designer. Refer to
documentation section Captiva Capture Guide > Scripting Guide> Recognition
Scripting > Recognition Programming Reference > VBA Script Editor > Using
Breakpoints
For .NET Code Module Scripting, you can use the same approach as Client Scripting,
but you would instead attach to the CodeClient.exe process. Alternatively, you can
add code to the script to write debug messages to the trace log and UI window using
the Trace method, which is invoked only when module is launched with a tracing
command line parameter. Refer to documentation section Captiva Capture Guide
> Scripting Guide > Task Scripting > .NET Code Module Guide > Setup >
Debugging and Error Handling > Custom Code Errors
Profile Scripting: no direct access to batch data outside of the current task
Recognition Scripting: no direct access to batch data outside of the current task
CaptureFlow Scripting: no ability to alter batch structure or access stage files; not
supported to access databases or use 3rd party DLLs
23