Transflo DMS Enterprise Client API
This older KB article provides sample code and requirements to connect, upload, and retrieve documents from the TRANSFLO® Server using the Classic Transflo DMS Client API. TRANSFLO Client API is a set of libraries that have various methods to import and extract batches of documents to and from the TRANSFLO® System. The TRANSFLO® Client objects are available as COM libraries or as .NET 4.0 assemblies.
Tip: In order to invoke TRANSFLO® Functionality from other languages and platforms, you must use the TRANSFLO® Web Service API. See Transflo DMS Web Service API.
The TRANSFLO® Client API consists of the following libraries and dependent libraries:
-
Transflo.dll
-
Transflo.Client.dll
-
Transflo.Shared.dll
-
NZipLib.TF.dll
-
Microsoft.Web.Services3.dll
The Client Configuration application consists of the Client API libraries and the following items:
-
Transflo.ClientConfig.exe
-
Transflo.Components.dll
-
Transflo.Forms.dll
Note: Any assembly you create to interact with the TRANSFLO® Client API must be a .NET 4.0 assembly.
Before using the TRANSFLO® Client API, follow these steps to set up the environment:
-
If you are using the COM interface, register TRANSFLO® Client API DLL files for COM.
The syntax for registering the COM components in a Windows command prompt is:
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe Transflo.dll /codebase
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe Transflo.Client.dll /codebase
-
Open the TRANSFLO® Client Configuration application and enter the TRANSFLO® Web Service URL.
-
Click the Validate button.
-
Once a valid URL is configured click OK.
This section describes the basic steps for programming with the TRANSFLO® Client Interface API.
-
Connect to the TRANSFLO® Server.
-
Get and update latest configuration.
-
Create a batch of documents.
-
Assign metadata to the batch.
-
Submit the batch to the TRANSFLO® Server.
-
Get a batch and modify it.
-
Submit a batch to the repository.
-
Log out and end session.
The following table lists the supported exposed repository objects of the Transflo Client API:
Object |
Properties |
Methods |
Document A representation of a Transflo repository document. |
|
|
The Repository API is used to interact with documents that have been saved in the configured permanent repository. These functions work for all supported repositories and return the same type of data. The supported repositories are TRANSFLO® and OpenText Gauss. All references in this section to the term document refer to the repository document class In Transflo DMS, a document class (DocClass) is a defined set of document types and associated fields. A Transflo document class has built-in security and is a good way to separate types of documents by department where document data is sensitive in nature, such as documents for human resource personnel records, taxes, billing, security, military, or government data..
In August 2023, a Web API enhancement [152279] was implemented to improve API support for Gauss repositories.
The repository document class Transflo.Bridge.Repository.Document is the basic document object type returned by GetRepository DocumentsData( ) and other methods.
Properties
Name | Description |
Data Type |
|
---|---|---|---|
This property represents the TRANSFLO® user name and has to be assigned when creating or rotating images and when the repository is Gauss. This property is only used when saving Documents to Gauss and is ignored when saving Documents to the TRANSFLO® Repository. |
string |
|
|
An array of bytes of the actual document image |
byte[] |
|
|
Indicates if the Bytes property is empty or not. |
bool |
True False |
|
Id of the document |
string |
|
|
Filename of the document; generally is built based on the id of the document. |
string |
|
|
Indicates the file type, such as TIF, JPEG, etc. Normally contains the file’s extension. |
string |
File name extension |
|
Indicates the total number of Fields. |
int |
|
|
Indicates the total number of Annotations. |
int |
|
|
Document class name |
string |
|
|
Commands that will be applied to the Document when it is saved. Only rotation commands (Rotate 90 degrees clockwise, Rotate 180 degrees clockwise, or Rotate 270 degrees clockwise) are valid for Repository. |
Document Command[] |
Rotate90 Rotate180 Rotate270 |
|
Inserts a DateTime |
DateTime |
|
Methods
Method |
Description |
Parameters - Values |
Returns |
Returns the list of document types and count for the specified document class and Key Field value pairs. |
string docClassName: Document class name string fieldToCount: The name of the field used to store the doc type, generally is DOCTYPE string keyFieldValuePairList: The list of key names and values to look for, expressed as keyname=value[,...]Example1: "BATCHID=12345"Example2: "PRO=123, DRIVERNAME=MICHAEL" |
string: with the coma separated values of the doc types and the count found expressed as doctype=count[,...].Returns an empty string if nothing is found for the specified arguments. Example 1: "BOL=4,POD=3" Example 2: "BOL=1 |
|
Returns an array of repository document objects as the result of the search using the arguments specified |
string docClassName: Document class name string keyFields: Key fields to search for, list of name value pairs in the format name1=value1[,name2=value2[,...]] RepositoryDocumentOptions documentOptionsToInclude: Indicates extra data to include in the document object; the values can be combined. None or 0 will not include anything extra, just the document data is returned that is the basic fields defined for the document class, etc. Annotations or 1 will include all the annotations the document may have. Image or 2 will include the document image. Annotation + Image or 3 will include the annotations and the image for the document. Always use NONE or 0 unless the image or annotations are strictly needed. |
Document[] array: of repository document objects |
|
Returns an array of repository documents as the result of the search using the arguments specified and filtered by the specified date range. |
string docClassName: Document class name string keyFields: Key fields to search for, list of name value pairs in the format name1=value1[, name2=value2[,...]] RepositoryDocumentOptions documentOptionsToInclude: Indicates extra data to include in the document object, the values can be combined DateTime fromDate: from date of date range DateTime toDate: to date of date range |
Document[]: array of repository documents |
|
Returns a list of Document Class names that the user has access to. Returns an empty list if the User does not have permissions to any Document Class. |
None. |
StringCollection: list of Document Class names. |
|
Returns a list of Field names from the specified Document Class name. |
string docClassName: Document Class name. |
StringCollection: list of field names |
|
Saves the Repository Document passed as argument. This method will not create new documents in the system. It is intended to update existing documents. |
Document document: The Document to be saved |
void |
|
Saves all the repository documents passed in the array of documents. This method will not create new documents in the system; it is intended to update existing documents. |
Document[] documents: The array of Documents to be saved. |
void |
|
FindField |
Return the document field that matches the fieldName parameter. |
string fieldName: The name of the Field retrieve. |
DocumentField |
GetField |
Return the document field by field index; use this when looping through all fields. |
int fieldIndex: the index of the Field to retrieve. |
DocumentField |
GetAnnotation |
Return an anotation by itd index. |
int annotationIndex: the index of the annotation to retrieve. |
Annotation |
Example
The example in this section is written in Microsoft C# programming language. A C# demo application is included with this API documentation in the scripts.zip file in the Transflo Client API Demo folder. To use the demo application:
-
Install the TRANSFLO® Standalone Client Component. (This is shipped with the TRANSFLO® Installers.)
Execute step 1 only if you do not have the TRANSFLO® Client application already installed, or if the intention of the API usage will be in a box with no TRANSFLO® Client application at all.
-
Run the Client Config at the end of the installation and configure the URL for the TRANSFLO® server you plan to use and validate.
-
Create a folder on your hard drive.
-
Unzip the demo application from the scrips.zip file and copy the Transflo Client API Demofolder into the folder you created in the previous step.
-
Load the included solution, build the demo app, and run it.
-
If one or more references to any assemblies fail, re-add them from the folder where the client was installed. The default location is:
C:\Program Files (x86)\Common Files\Pegasus TransTech\Transflo Client
The following table lists the supported exposed non-repository objects of the TRANSFLO® Client API:
Object |
Properties |
Methods |
Client The main object used to access the Transflo Client API. |
|
|
Session Used to represent a client session. |
|
|
Queue Used to represent a TRANSFLO® Queue. |
|
|
Batch Represents a Transflo batch. |
|
|
Document Represents a Transflo document. |
|
|
FieldCollection A representation of a set of Transflo fields. |
|
|
Field Represents a Transflo field. |
|
|
The client object is the main object used to access the TRANSFLO® Client API.
Properties
Name | Description | Data Type | Possible Values |
---|---|---|---|
The way the session is going to authenticate to the TRANSFLO® Server:
|
Int |
1 = None 2 = NTPassThru 3 = Transflo |
|
User name (for TRANSFLO® Authentication) |
String |
|
|
User password (for TRANSFLO® Authentication) |
String |
|
Methods
Method | Description | Parameters - Values | Returns |
---|---|---|---|
Used to initialize a TRANSFLO® Client Application. |
int appId – 2 = Capture® Indexing Application 15 = Other string LogPath = “.” Use application folder string WorkPath = “.” Use application folder |
void |
|
Connects and authenticates to TRANSFLO® Server, using provided authentication method and credentials. It also gets or updates the local configuration from the TRANSFLO® Server. |
void |
Session object |
Examples
The following VBScript examples show how to authenticate to and establish a session with the TRANSFLO® Server:
// Create a Client object and set the authentication type to “transflo”
set tfclient = CreateObject("Transflo.TFClient.Client")
tfclient.AuthenticationType = 3
// Set the UserId and Password properties
tfclient.UserId = "Administrator"
tfclient.password = "pegasustranstech"
// Initialize a Client Application of type “Other”
// Set the path to store logs in a “Logs” relative path
// Set the path to store logs in a “Logs” relative path
tfclient.Initialize 15, "Logs", "."
// Establish connection and a session with the TRANSLFO® Server
// Synchronize local configuration with the configuration on the
// TRANSLFO® Server
set session = tfclient.BeginSession
The session object is used to represent a client session with the TRANSFLO® Server.
Properties
Name |
Description |
Data Type |
Possible Values |
---|---|---|---|
True indicates that batch submission should be synchronous. False indicates that batch submission will be performed by background thread. |
boolean |
True False |
|
True indicates that source documents should not be removed after successful batch submission. |
boolean |
True False |
|
Used to lock a portion of the TRANSFLO® Database. |
int |
0 – No locks exist 2 – System locked 3 – Company locked 4 – Application locked |
Methods
Method |
Description |
Parameters - Values |
Returns |
End current session and disconnect from the TRANSFLO® Server. |
void |
void |
|
Get the Queue for the session. |
string name – name of Queue |
Queue |
|
Get the Document Class for the session. |
string name – name of Document Class |
DocClass |
|
string name – name of Alias |
Alias |
||
Date and time the Last Keep Alive was sent. |
void |
DateTime |
|
Get the entire Queue list for the session’s Document Class. |
void |
QueueList |
|
Returns number of Batches currently being submitted in the background. |
void |
Int |
|
Wait for the background thread to finish submission of all pending Batches. |
void |
void |
|
RecoverAndCleanUpSessions |
Ensures that previous abnormally terminated session data is cleaned up. |
void |
void |
Example
The following VBScript example shows how to use the session object.
// Use Client object to establish a session
set session = tfclient.BeginSession
// Set Batch Submission to be synchronous
session.SyncSubmit = true
// Keep source image files
session.KeepSourceDocuments = true
// Perform session housekeeping to clean up data abnormally
// terminated sessions
session.RecoverAndCleanUpSessions
// Acquire the Index Queue object from the TRANSFLO® Server
set queue = session.GetQueue("INDEX")
//*********************************
//*
//* ENTER BATCH CODE HERE
//*
//*********************************
// End session
session.Logout
The queue object is used to represent a TRANSFLO® Queue.
Properties
Name |
Description |
Data Type |
Possible Values |
Name of the queue. |
String |
Any name such as INDEX or IMPORT. |
|
Description of the queue. |
String |
|
Methods
Method | Description |
Parameters - Values |
Returns |
---|---|---|---|
Creates a new batch. |
void |
Batch |
|
Returns number of Batches in the Queue. |
void |
Int |
|
Returns the next batch from the Queue. |
BatchFilterCollection filter = nothing bool getAllActivities = true |
Batch |
Examples
The following examples illustrates how to use the Queue object and, after a session is established, how to display the number of batches in the queue and get the next batch:
// Use the Session object to acquire a Queue
set queue = session.GetQueue("INDEX")
// Get the number of Batches in the Queue
count = CInt(queue.GetBatchCount)
// Get the Queue name
name = queue.QueueName
// Display the number of Batches and the Queue name
MsgBox "There are " & count & " batches in the queue " & name
// Retrieve the next Batch in the Queue
set batch = queue.GetNextBatch(nothing, true)
The batch object is a representation of a TRANSFLO® batch of documents.
Properties
Name | Description | Data Type | Possible Values |
---|---|---|---|
Gets or sets TRANSFLO® Alias name for the batch. |
String |
Name of the Alias |
|
WorkFlow indicator, indicates that a WorkFlow Case needs to be initiated for the batch. |
Bool |
True False |
|
User who created the batch. |
String |
User Name |
|
Time Batch was created. |
DateTime |
|
|
Returns a collection of Document data for the batch. |
DocumentCollection |
|
|
Origination Module ID. Indicates the Application that created the batch. |
Int |
BatchScan = 1, Index = 2, TerminalScan = 3, TransfloExpress = 4, Import = 5, RenditionPrint = 6, FieldImaging = 7, ManagementReports = 8, AdministrationTool = 9, Monitor = 10, WebService = 11, Gateway = 12, TripPack = 13, ExpressIndex = 14, InboundEmail = 15, InboundFax = 16, FieldImagingExtractor = 17, EScan = 18, Print = 19, OutboundEmail = 20, PBSImport = 21, PBSExport = 22, CSVImport = 23, HecConfigTool = 24, Workflow = 25, Other = 26, CaptureScan = 27 |
Methods
Method |
Description |
Parameters - Values |
Returns |
Appends the document specified by the filePath parameter to the end of the batch. |
string filePath – pathname of the file to be added to the batch |
Document |
|
Deletes the specified Document from the batch. |
Document document |
void |
|
Removes a Document at a specified position from the batch. |
int order – position of document to be removed from the batch |
void |
|
For synchronous batch submission the Save method submits the batch to the TRANSFLO® Server. In the case of background submission it queues the batch for submission. |
void |
void |
|
Downloads the Batch Documents from the TRANSFLO® Server. |
void |
void |
|
Moves batch to a different Queue. |
void |
void |
Examples
The following examples show how to use the batch object to get the documents from an existing batch.
// Retrieve the next Batch in the Queue
set batch = queue.GetNextBatch(nothing, true)
// Load Batch Documents
batch.LoadAllDocuments
The following example illustrates how to create a new batch, add Document images to it and submit it.
// Use the Session object to select the Queue where
// Batch will be created.
set queue = session.GetQueue("INDEX")
// Use the Queue object to create a Batch object
set batch = queue.CreateBatch
// Set the Batch Alias name
batch.AliasName = "Test"
// Set the application that created the Batch to “Other”
batch.OriginModule = 26
// Add Document images to the Batch
set doc1 = batch.AddDocument(".\1.tif")
set doc2 = batch.AddDocument(".\2.tif")
//Save the Batch
batch.Save
The document object represents a document image and any associated Transflo fields.
Properties
Name | Description |
Data Type |
Possible Values |
---|---|---|---|
Contains document fields. |
FieldCollection |
Collection of Fields |
|
Contains path to the Document file. |
String |
UNC path |
|
Contains Document id. |
Int |
Document Identifier |
|
Contains the position of the document in the batch |
Int |
|
Methods
Method |
Description |
Parameters - Values |
Returns |
---|---|---|---|
Adds an Activity record to the Document. |
int ActivityType - 0 = None 1 = OMR 2 = Pass 3 = Reject 4 = Accept 5 = Import 6 = Origination 7 = SplitDocumentOnly 8 = SplitDocumentPlusData 9 = Rotated 10 = Print 11 = EmailDocument 12 = ExceptionManager 13 = PBSImport 14 = PBSExport 15 = Restore 16 = DataChanged 17 = DocumentClassChanged 18 = BorderRemoved 19 = FilePurged 20 = EmailNotification DateTime activityDateTime int durationMs string comment |
void |
|
Rotates document image. |
int command – 3 = 90 degrees 4 = 180 degrees 5 = 270 degrees |
void |
|
Moves document to new position in the batch. |
int newOrder |
void |
|
Clone |
Creates a copy of the current document |
N/A |
Clone of Document |
Examples
The examples below demonstrate how to use some basic portions of the TRANSFLO® Document object.
// Load all Documents in the Batch
batch.LoadAllDocuments
// Get first document from the Batch
set doc1 = batch.Documents.Item(0)
// Rotate the document by 90 degrees
doc1.Rotate 3
// Create an activity record for the document rotation at the
// current date & time, that took 0 milliseconds and has a comment
// “rotated document 90”
doc1.AddActivity 9, Now, 0, "rotated document 90"
// Save changes made to the Batch
batch.Save
Accepting and Re-indexing Documents
TRANSFLO® Capture provides a means to copy a Document and re-index the copy . This action is known as Accept and Re-index.
To Accept and Re-index a Document, follow these steps:
-
Create a copy of the current document by calling the Document.Clone method.
-
Add the Accept activity to the current document.
The FieldCollection object is a representation of the collection of metadata fields associated with one or more documents. This data is stored in TRANSFLO® Fields.
Property
Name |
Description |
Data Type |
Possible Values |
---|---|---|---|
Count |
Number of Fields in the Document |
Int |
|
Method
Method | Description |
Parameters - Values |
Returns |
---|---|---|---|
ByName |
Returns a field object based on the field name provided. |
string FieldsName |
Field |
The field object is a representation of the metadata associated with a document that is stored in a TRANSFLO® Field.
Properties
Name | Description |
Data Type |
Possible Values |
---|---|---|---|
Name |
Field Name |
String |
|
Value |
Field Value |
String |
|
Changed |
Indicates that the field values have changed |
Bool |
True False |
Methods
There are no methods associated with the field object.
Example
The following examples illustrate how to assign field data to a batch:
// Create a Batch and set Batch properties
set batch = queue.CreateBatch
batch.AliasName = "Test"
batch.OriginModule = 26
// Add 2 documents to the Batch
set doc1 = batch.AddDocument(".\1.tif")
set doc2 = batch.AddDocument(".\2.tif")
// Create 3 fields and assign them values
set field = doc1.Fields.ByName("BatchId")
field.Value = "20080722-1"
set field = doc1.Fields.ByName("field1")
field.Value = "123"
set field = doc1.Fields.ByName("field2")
field.Value = "2"
// Submit Batch with attached Field Data
batch.Save
This TRANSFLO® Client Interface API Knowledge Base is intended for software developers, engineers, and architects who are implementing solutions that will expand the TRANSFLO® DMS suite of products. Pegasus TransTech reserves the right to make updates and improvements to the TRANSFLO® Client Interface with or without notice.