Print Command Script works from command line, not from Integration Builder フォローする
I am trying to build an integration to an ERP system that directly supports Bartender.
The ERP application generates files like these
%BTW% /AF="E:\somepath\somedocument.btw" /D="<Trigger File Name>" /PRN="\\server\printer" /DBTEXTHEADER=3 /R=3 /P
It may be worth to note that
- the string "<Trigger File Name>" is literally there (unlike somedocument.btw and \\server\printer)
- there is an empty fifth line
- the CSV data lines can be _very_ long, with _lots_ of fields
- the generated file is UTF-8 encoded, with a UTF BOM (byte order marker) prefix
The ERP application comes with sample ,btw documents for use with these files. These documents needed to be modified, because the database connection did not match with actual data. So I corrected the sample documents by editing a generated script file, deleting the first two lines, and the last empty lin. This left two lines, one with field names, one with field values. I replaced the old database connection to this text file, and then adjusted each referred database field.
When testing the integration I built for these files, I am getting an error message for each database field I refer to, like
An object on the template was set to read in the field
"ReceiptLabel.ReceiptLabel._RcvDtl_PONum". However, this field was not found. Proceed with
unknown fields as blank strings?
The test output shows the command line used:
Submitted BarTender Command Line '/AF="E:\somepath\somedocument.btw" /D="E:\somescanfolder\somescript.txt" /PRN="\\server\printer" /DBTEXTHEADER=3 /R=3 /P' on print server 'server'.
Now when I copy this command line and prepend the path for bartend.exe like this
"C:\Program Files\Seagull\BarTender Suite\bartend.exe" /AF="E:\somepath\somedocument.btw" /D="E:\somescanfolder\somescript.txt" /PRN="\\server\printer" /DBTEXTHEADER=3 /R=3 /P
then the job prints just fine, with all the expected actual data.
It may be worth to note that the path "E:\somescanfolder\somescript.txt" is pointing to the script file after having been renamed by Integration Builder.
Program: BarTender Integration Builder 2016 R8
License: Enterprise Automation (3 Printers)
Version: 18.104.22.16853 (64-bit)
OS: Windows Server 2012 Datacenter x64 build 9200