Transflo DMS Enterprise Workflow API
TRANSFLO® Workflow is a suite of products that allow you to define your business processes and assign users to steps (Workflow Queues) where work is processed. Each instance of a workflow process that is started is called a case. TRANSFLO® has built-in processes to initiate cases. You can start a case using a Workflow Initiator (WFI) file or the Workflow Action Processor.
TRANSFLO® Workflow allows you to use VBScript to write custom scripts and insert them in your workflow processes. Custom scripts use the TRANSFLO® Scripting Agent that is packaged in the TRANSFLO® System Agent during TRANSFLO® Server installation.
Sometimes known as the connector, TRANSFLO® Workflow API is a set of libraries that have various methods to extract and import batches of documents to and from the system. The API objects are available as COM Component Object Model (COM) is a Microsoft standard for the interface used for communication across components. In Transflo DMS object models, data architectures, and APIs, the Microsoft COM standard plays a key role. COM specifies the basic binary object standard, defines certain basic interfaces that provide functions common to all COM-based technologies, and provides a small number of functions that all components require. COM defines how objects work together over a distributed environment and has added security features to help provide system and component integrity. A software object is made up of a set of data and the functions that manipulate that data. Access to COM object data is achieved exclusively through one or more sets of related functions called interfaces. The functions of an interface are called methods. COM requires that the only way to gain access to the methods of an interface is through a pointer to the interface. libraries or as .NET 2.0 assemblies.
The API libraries and dependent libraries are listed below:
-
Transflo.dll
-
Transflo.Bridge.Repository.dll
-
Transflo.Bridge.Workflow.dll
-
Transflo.Client.dll
-
Transflo.Drawing.dll
-
Transflo.Shared.dll
-
NZipLib.TF.dll
-
Microsoft.Web.Services3.dll
The Client Configuration application consists of the following items:
-
Client API libraries
-
Transflo.ClientConfig.exe
-
Transflo.Components.dll
-
Transflo.Forms.dll

Before using the TRANSFLO® Client API, set up the environment:
-
Register each TRANSFLO® Client API DLL for COM. (This step is only necessary if you are using the COM interface.)
The syntax for registering the COM components at a Windows Command Prompt is:
%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe Transflo.dll /codebase
%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\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.

The simplest way to start workflow instances is to create WFI files (with a required .wfi file extension) and place them in the folder configured by TRANSFLO® for WFI files. This folder contains information about which process to invoke and what data to associate with the workflow case In Transflo DMS, a case is an instance of a workflow process..
The case history is also stored in the WFI file. The data in WFI files consists primarily of name and value pairs. The following table summarizes the structure of a WFI file:
Section |
Element |
Description |
---|---|---|
Header |
; Workflow Initiator File |
First line of the WFI file indicating that it is a Workflow Initiator file. |
[Override] |
Plan= |
Defines the process that will be used to create the process instance or case. |
[Table1] |
Name= |
Name of the Image Repository’sDocument Class that contains the Documents associated with the Case. |
NumOfFields= |
Number of Fields in the Document Class. |
|
Field<x>= |
The name of the field where <x> represents the Field Number. Field1 is always DOCCLASS and is used to pass the Document Class to the Process instance or Case. |
|
Data<x>= |
The data that is associated with Field number <x>. |
|
Key<x>= |
If Field <x> is a Key Field it will contain an integer starting with 1. If the Field is not a Key Field the value is left blank. |
|
Desc<x>= |
A description of Field <x>. Field<x>, Data<x>, Key<x>, and Desc<x> are repeated until all of the Fields for the Case are defined. |
|
[WFFIELDS] |
NumOfTables=1 |
The number of tables defined for the Case. This is always 1, since multiple tables are not supported. |
[History} |
|
A list of activities that happened with the Case. This usually contains information about a Case after it was created. |
Example
The following WFI file is for a process named BILLINGT:
; WorkFlow Initiator File
[OVERRIDE]
PLAN=BILLINGT
[Table1]
Name=PTCDEMO
NumOfFields=7
Field1=DOCCLASS
Data1=PTCDEMO
Key1=
Desc1=
Field2=PRO
Data2=TEST
Key2=1
Desc2=1
Field3=TRACTORNUMBER
Data3=
Key3=
Desc3=
Field4=DELIVERYDATE
Data4=20090929 005A1
Key4=
Desc4=
Field5=BILLTONAME
Data5=
Key5=
Desc5=
Field6=ISRATED
Data6=
Key6=
Desc6=
Field7=ISINVOICED
Data7=
Key7=
Desc7=
[WFFIELDS]
NumOfTables=1
[History]
2/22/2011 4:26:09 PM=New workflow case [674531] successfully created from file.

A workflow API action processor is used to start a case using a web service call. The following diagram illustrates the ActionProcessor architecture:
Example
The following source code is from an ASP.Net page called StartCase_UsingActionProcessor.aspx:
<%@ Page Language="C#" Debug="true" %>
<%@ Import Namespace="System.Xml" %>
<script runat="server">
private void Page_Load(object sender, System.EventArgs e) {
// Generate the XML request structure
String req = "";
req += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
req += "<ap:Action xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
req += " xmlns:sso=\"http://tibco.com/bpm/sso/types\"";
req += " xmlns:ap=\"http://tibco.com/bpm/actionprocessor\">";
req += "<ap:Authentication>";
req += " <ap:Login>";
req += " <sso:NodeCtx>";
req += " <sso:NodeId>";
req += " <sso:Name>" + ConfigurationManager.AppSettings.Get("iPE_NodeName") + "</sso:Name>";
req += " <sso:ComputerName>" + ConfigurationManager.AppSettings.Get("iPE_ComputerName") + "</sso:ComputerName>";
req += " <sso:IPAddress>" + ConfigurationManager.AppSettings.Get("iPE_IPAddress") + "</sso:IPAddress>";
req += " <sso:TCPPort>" + ConfigurationManager.AppSettings.Get("iPE_TCPPort") + "</sso:TCPPort>";
req += " <sso:IsDirector>" + ConfigurationManager.AppSettings.Get("iPE_IsDirector") + "</sso:IsDirector>";
req += " </sso:NodeId>";
req += " <sso:UserName>" + ConfigurationManager.AppSettings.Get("iPE_UserName") + "</sso:UserName>";
req += " <sso:Password>" + ConfigurationManager.AppSettings.Get("iPE_Password") + "</sso:Password>";
req += " </sso:NodeCtx>";
req += " </ap:Login>";
req += "</ap:Authentication>";
req += "<ap:User>";
req += " <ap:StartCase>";
req += " <sso:ProcTag>" + ConfigurationManager.AppSettings.Get("iPE_NodeName") + "|" + ConfigurationManager.AppSettings.Get("iPE_ProcName") + "|-1|-1</sso:ProcTag>";
req += " <sso:Description>Start from ActionProcessor</sso:Description>";
req += " <sso:ReleaseItem>true</sso:ReleaseItem>";
req += " <sso:ValidateFields>false</sso:ValidateFields>";
req += " <sso:Fields>";
req += "<sso:vField><sso:Name>SW_QPARAM1</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("SW_QPARAM1") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>SW_QPARAM4</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("SW_QPARAM4") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>QUICKPAY</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("QUICKPAY") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>ORIGIN</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("ORIGIN") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>DESTINATION</sso:Name><sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("DESTINATION") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>PONO</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("PONO") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>SW_QPARAM3</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("SW_QPARAM3") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>BOLNO</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("BOLNO") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>BILLCODE</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("BILLCODE") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>MANIFEST</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("MANIFEST") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>EDI</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("EDI") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>INVOICE</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("INVOICE") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>BROKER</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("BROKER") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>OWNEROP</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" + Request.Form.Get("OWNEROP") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>COMPANY</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("COMPANY") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>BRANCH</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("BRANCH") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>PAID</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("PAID") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>DISPATCH</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("DISPATCH") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>SW_QPARAM2</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("SW_QPARAM2") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>DOCTYPE</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("DOCTYPE") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>DOCCHECK</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("DOCCHECK") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>BATCHID</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("BATCHID") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>INVNUM</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("INVNUM") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>ROUTING</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("ROUTING") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>TFDATABASE1</sso:Name><sso:FieldType>swText</sso:FieldType><sso:Value>" +
Request.Form.Get("TFDATABASE1") + "</sso:Value></sso:vField>";
req += "<sso:vField><sso:Name>TFTABLE1</sso:Name> <sso:FieldType>swText</sso:FieldType><sso:Value>" + Request.Form.Get("TFTABLE1") + "</sso:Value></sso:vField>";
req += " </sso:Fields>";
req += " </ap:StartCase>";
req += "</ap:User>";
req += "</ap:Action>";
// Open a HTTP stream (we do this because the "req" string is likely to overflow the URI if used directly)
System.Net.HttpWebRequest httpRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(
"http://" + ConfigurationManager.AppSettings.Get("iPE_ComputerName") + ":8080/TIBCOActProc/ActionProcessor.servlet");
httpRequest.Method = "POST";
httpRequest.ContentType = "application/x-www-form-urlencoded";
byte[] data = new ASCIIEncoding().GetBytes("action=" + req);
httpRequest.ContentLength = data.Length;
httpRequest.GetRequestStream().Write(data, 0, data.Length);
httpRequest.GetRequestStream().Close();
System.Net.WebResponse httpResponse = httpRequest.GetResponse();
// Invoke the ActionProcessor, capture the XML output repsponse in a string buffer
// XmlTextReader ap = new XmlTextReader("http://tibcodemo:8080/TIBCOActProc/ActionProcessor.servlet?action=" +
HttpUtility.UrlEncode(req));
XmlTextReader ap = new XmlTextReader(httpResponse.GetResponseStream());
ap.MoveToContent();
System.Text.StringBuilder sbXML = new System.Text.StringBuilder(ap.ReadOuterXml());
// Extract the new Case Number
XmlDocument d = new XmlDocument();
d.LoadXml(sbXML.ToString());
XmlNamespaceManager nsmgr = new XmlNamespaceManager(d.NameTable);
nsmgr.AddNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
nsmgr.AddNamespace("ap", "http://tibco.com/bpm/actionprocessor");
nsmgr.AddNamespace("sso", "http://tibco.com/bpm/sso/types");
XmlNode casenum = d.SelectSingleNode("//sso:CaseNumber", nsmgr);
if (casenum != null) lblResult.Text = casenum.InnerText; else lblResult.Text = "n/a";
// Display the XML input and output, useful for debug purposes
xmlRequest.DocumentContent = req;
xmlRequest.TransformSource = "XmlViewXslt.xslt";
xmlResponse.DocumentContent = sbXML.ToString();
xmlResponse.TransformSource = "XmlViewXslt.xslt";
}
</script>
<html>
<body>
Your new case number is <b><asp:Label id="lblResult" runat="server">Label</asp:Label></b>.
<br /><br /><br /><br />
<h5>Request (in XML format):</h5>
<asp:Xml id="xmlRequest" runat="server"></asp:Xml>
<br /><br />
<h5>Action Processor Response (in XML format):</h5>
<asp:Xml id="xmlResponse" runat="server"></asp:Xml>
<br /> <br />
</body>
</html>

TRANSFLO® Workflow allows you to use VBScript to write custom scripts and insert them in your Workflow Processes.
The Scripting Agent supports various methods, classes and properties.
The TRANSFLO® Scripting Agent supports the following standard TRANSFLO® Logging Levels:
1 = Log Errors only
2 = Log Errors and Warnings
3 = Log Errors, Warnings and Processing Information
4 = Log Errors, Warnings, Processing Information and Trace

Definition | Description |
---|---|
LogTrace(string msg) |
Writes the argument msg to the log file when system agent log level is set to 4. |
LogInfo(string msg) |
Writes the argument msg to the log file when system agent log level is set to 3 or 4. |
LogWarning(string msg) |
Write the argument msg to the log file when system agent log level is set to 2, 3, or 4. |
LogError(string msg) |
Writes the argument msg to the log file when system agent log level is set to any value. |
GetCaseField(string FieldName) |
Return an object of type CaseField with the Field data of the Field name passed as the FieldName argument. |
SetCaseField(CaseField caseField) |
Saves back the CaseField with the modifications. If you want to modify the value for any Case Field you can get the Case Field data by calling GetCaseField(), then modify the data and save it back to workflow by calling this method. |
SetCaseFieldValue(string FieldName, object FieldValue) |
Sets the Case Field value. To modify any Case Field you can use this method by specifying the Field name and value. |

Name | Properties | Description |
---|---|---|
CaseField |
string Name |
Name of the Workflow Field. |
object Value |
Value of the Workflow Field. |
|
CaseFieldType Type |
Type of workflow field. Possible types are: Bool, Int, Double, String, and DateTime. |