The purpose of the ProcessLegacy sample package is to provide a starting point to those looking to continue to process legacy non-XML data through AEM Forms, as they move from Adobe Central Output Server or another solution to AEM Forms.
The sample package includes the cmb-legacy.ecma script that determines:
- if the data needs to be run through a TDF file.
- the print output format (PS, PCL, and so on) to use based on any -asp printer requested on the JOB card.
- How to send the job to a printer, based on the -z option and its format. For example, direct to an IP address or a shared queue)
- Ensure that you have the appropriate packages for AEM Forms (adobe-aem-forms-pkg-<version>.zip), and Central Migration Bridge (adobe-aemfd-cmb-pkg<version>.zip) installed.
- You are familiar with Central Output Server and AEM technologies.
The sample package uses a custom logger to keep its log file separate from the system. You can change the logger at line 14 of the script, however if you want, you can set up a separate logger by performing the following steps:
- Go to AEM Configuration Manager at http://[hostname]:[port]/system/console/configMgr.
- Under the Sling menu, select Log Support.
- On the Log Support page, click Add new Logger.
- In the two fields, specify the log file name (for example, logs\cmb.log) in th first field and the logger (for example, cmb-logger) in the second field.
- Click Save. A sample log file cmb.log is created in CRX's /logs folder.
After the package is imported, you will see the in CRXDE Lite:
- The cmb-legacy.ecma script in /etc/workflow/scripts/cmb.
- a sample Field-Nominated data file, a sample XML file, a sample TDF file, and a sample XDP in /content/fd/cmb/samples/processlegacy.
All file names are lower case and there are reminder folders present to ensure that you remember to name everything in lower case. CRX is case-sensitive and when we extract the JOB name from the incoming data file, we convert it to lower case to eliminate inconsistencies and errors due to casing.
Generally, it is recommended to keep TDF files on a local disk instead of within AEM for high-performance. The sample chooses to move the TDF files within AEM to simplify maintenance (so that everything is in one place) and to eliminate the need to maintain multiple copies of your files on cluster nodes. However, it may not suit you if you are looking for extra speed.
Skip this section if your Adobe Central Output Server is installed at the default location.
The Migration Bridge also requires that your Adobe Central Output Server is installed on the same machine as your AEM is running on. However, it doesn't require Central to run (only installed).
Perform the following steps to change the location of Central Pro installation to the default location:
- Log in to Felix Console at http://[hostname]:[port]/system/console/configMgr.
- Go to OSGi> Configuration.
- Search for AEMFD OutputCentral Service.
- Click Edit (the pencil icon).
- Type the path to your Central Pro installation directory. For example, C:\Adobe\Central\ or /usr/adobe/central/.
- Click Save.
To run the sample:
- In a browser window, open the sample at http://[hostname]:[port]/crx/de/index.jsp#/content/fd/cmb/samples/processlegacy.
- Locate and open the sample.dat file, and copy its content to the clipboard.
- Right-click watchedfolder and select to create a new file with any name.
- In the new file, paste the content you copied from the sample.dat file.
- Change the IP address on the ^JOB line -z option or enter a UNC printer path. For example, -z123.456.789.012 or -z\\server\printer.
- Click Save All on the CRXDE Lite screen. Your file will be processed and you should see the output in less than a second.
You can do a number of other things using the cmb-legacy.ecma script. Feel free to examine it in detail and adapt it to your needs as you see fit.