The Intray transport monitors a file system directory for the addition of new files.
(This directory acts like an office "In Tray" of work to be done.)
When the transport detects a file-add event, it create a request and injects this
as a root request into its fulcrum module.
Architecturally the InTray transport can be used as a work flow event handler.
Configuration
The InTray transport must be hosted in a fulcrum module.
This can be done by adding the following to a module's module.xml
configuration resource:
<transports>
<transport>org.ten60.transport.intray.IntrayTransport</transport>
</transports>
The InTray transport will request its configuration from the
resource ffcpl:/etc/TransportIntrayConfig.xml
.
The configuration resource uses the following XML:
<IntrayConfig>
<in>/home/pjr/in</in>
<out>/home/pjr/out</out>
<processURI>active:dpml+operand@ffcpl:/myprocess/process.idoc</processURI>
<pollInterval>5000</pollInterval>
</IntrayConfig>
element |
description |
in |
Operating system dependent file path specification for the input directory.
The user under which NetKernel is running must have read priviledges for this directory.
|
out |
Operating system dependent file path specification for the output directory.
The user under which NetKernel is running must have write priviledges for this directory.
|
processURI |
URI requested when the InTray transport detects a file-add event.
The file URI is provided as the param argument.
|
pollInterval |
Time in milliseconds between times when the InTray transport polls the
input directory.
|
Examples
Simple File Copy
The simplest example copies a file that is added to the input directory to the output directory.
This can be done with the following DPML program:
<idoc>
<instr>
<type>copy</type>
<operand>this:param</operand>
<target>this:response</target>
</instr>
</idoc>
XSL-FO Distiller
This distiller will accept a document with XSL-FO source information
and convert it into a PDF document.
<idoc>
<instr>xslfo-fop</instr>
<operand>this:param</operand>
<operator>
<xslfo-fop>
<type>pdf</type>
</xslfo-fop>
</operator>
<target>this:response</target>
</idoc>