Copy Batch XML plugin
This topic describes how to configure the Copy Batch XML plugin in Transact. These steps are intended for Transact administrators.
The Copy Batch XML plugin exports batch.xml and batch files (multi-page PDFs and TIFs) files to the final drop folder. In the plugin configuration screen for the plugin, you can modify the names of the copied document files and the path where these files are copied to.
Prerequisites
To configure and use the COPY_BATCH_XML plugin, the following configurations must be in place:
- You need a batch class with a document type configured. For detailed steps, see Add new document type.
- The COPY_BATCH_XML plugin must be added to the Export module for the batch class. For more detailed steps, see Configure plugins.
Configure the Copy Batch XML plugin
This topic provides the information on how to configure the Copy Batch XML plugin. This plugin only needs to be configured once per batch class.
- From the Batch Class Management page, select and open your batch class.
-
Go to
.
-
Configure the required fields according to your workflow needs. Use the following table as a reference.
Configurable property
Options
Description
Batch XML Export Folder Location
N/A
This property specifies the folder path where the batch XML is exported. This can be any valid folder location. If the folder does not exist, it is created upon export.
Export To Folder Switch
- ON
- OFF
This switch enables or disables exporting the batch XML.
Batch XML Export Folder
- Final Export Folder
- Batch Instance Folder
This property determines where the batch XML is copied to. Available locations are:
- Final Export Folder: Batch XML is copied directly to the drop folder specified in Batch XML Export Folder Location.
- Batch Instance Folder: Batch XML is copied to the batch instance identifier folder within the drop folder specified in Batch XML Export Folder Location. The batch XML is formatted as <BatchInstance_ID>_batch.xml.
Copy File Type(s)
- Tiff
- Tiff and PDF
This property determines what file type should be exported to the location specified in Export Document Folder Location.
Export Document Folder Location
N/A
This property specifies the folder path where the final batch XML is exported. This file path can include dynamic variables.
Export Document File Name
N/A
This property specifies the file name of the exported document. This file name can include dynamic variables.
Dynamic variables
The Export Document Folder Location and Export Document File Name can include dynamic variables that are replaced with their corresponding values when the document is exported. The Copy Batch XML plugin supports the following dynamic variables:
- $BATCH_IDENTIFIER
- $BATCH_CLASS
- $BATCH_FIELD_VALUE
- $DOCUMENT_TYPE
- $DOCUMENT_ID (Mandatory. Removing this variable will result in failed validation.)
- $SERVER_NAME
- $DATE
- $TIME
- $DLF:<DocumentLevelField>
Use multiple dynamic variables
Separator |
Use |
---|---|
&& |
To separate two parameters. |
& _ & |
To separate two parameters using an underscore. There must be spaces between the ampersands and the underscore.
|
For example, if the Export Document File Name is entered as:
$DLF:InvoiceDate & _ & $DLF:InvoiceNumber & _ & $BATCH_IDENTIFIER & _& $DOCUMENT_ID
And the batch XML has the following values for these parameters:
-
InvoiceDate: 13Jan
-
InvoiceNumber: INV1234
-
BATCH_IDENTIFIER: BI2
-
DOCUMENT_ID: Doc1
Then the exported file name is: 13Jan_INV1234_BI2_Doc1.
Handle invalid characters
Invalid characters refer to any character that cannot be used for a file or folder name according to your operating system.
For example, on Windows this includes the following special characters:
-
< (less than)
-
> (greater than)
-
: (colon)
-
" (double quote)
-
/ (forward slash)
-
\ (backslash)
-
| (vertical bar or pipe)
-
? (question mark)
-
* (asterisk)
If any invalid character is used in the Export Document Folder Location or Export Document File Name, or if the value of any parameter contains an invalid character, it is replaced with an empty string by default.
You can change the default replacement in the dcma-export.properties file. To do so, perform the following steps:
- Open the dcma-export.properties file, located at [Ephesoft_Directory]\Application\WEB-INF\classes\META-INF\dcma-export.
-
Set
export.replace_char to the character that should replace any invalid characters. In the following
example, it is set to an underscore ( _ ).
Dependencies
The COPY_BATCH_XML plugin has a dependency on the CREATEMULTIPAGE_FILES plugin. The following fields must match between the two plugins:
-
COPY_BATCH_XML:
Copy File Type(s)
-
CREATEMULTIPAGE_FILES:
Multipage File Creation Type
Troubleshooting
Error message |
Possible root cause |
---|---|
Could not create folder |
The batch instance folder could not be created in the Final Export Folder. Check for permissions on this folder. |
Folder does not exist |
The folder specified for the Final Export Folder does not exist. |