Implementation Note: This facility is still a work in progress. Requiring this service in a configuration is messy. In future releases this service should be hidden from users.
| filter | Provide a regular expression filter on the directory to reduce the stream of events. |
| kinds | Kinds of events to watch, as specified by the Standard Watch Event Kinds, Either ENTRY_CREATE or ENTRY_MODIFY. |
| name | The name of this service. |
| numberOfConsumers | |
| paths | |
| to |
| Example 1 | Trigger when two files arrive. |
| Configured By | ATTRIBUTE |
| Access | READ_WRITE |
| Required | No. |
Provide a regular expression filter on the directory to reduce the stream of events.
| Configured By | ATTRIBUTE |
| Access | READ_WRITE |
| Required | No. |
Kinds of events to watch, as specified by the Standard Watch Event Kinds, Either ENTRY_CREATE or ENTRY_MODIFY. Note that ENTRY_DELETE will not work in the current implementation.
| Configured By | ATTRIBUTE |
| Access | READ_WRITE |
| Required | No. |
The name of this service.
| Access | READ_ONLY |
| Configured By | ELEMENT |
| Access | READ_WRITE |
| Configured By | ELEMENT |
| Access | READ_WRITE |
Trigger when two files arrive.
<oddjob>
<job>
<sequential>
<jobs>
<mkdir dir="${some.dir}/etc" name="Create Test Dir"/>
<file-watch id="file-watch" kinds="ENTRY_CREATE"/>
<events:when id="both-files" name="When Both Files" xmlns:events="oddjob:events">
<jobs>
<events:list eventOperator="ALL">
<of>
<events:watch name="Watch File 1">
<eventSource>
<events:file>
<fileWatch>
<value value="${file-watch}"/>
</fileWatch>
<file>
<value value="${some.dir}/file1.txt"/>
</file>
</events:file>
</eventSource>
</events:watch>
<events:watch name="Watch File 2">
<eventSource>
<events:file>
<fileWatch>
<value value="${file-watch}"/>
</fileWatch>
<file>
<value value="${some.dir}/file2.txt"/>
</file>
</events:file>
</eventSource>
</events:watch>
</of>
</events:list>
<echo id="task">
${both-files.trigger.ofs}
</echo>
</jobs>
</events:when>
<folder>
<jobs>
<copy id="createFile1" name="Create File 1" to="${some.dir}/file1.txt">
<input>
<buffer>
Test1
</buffer>
</input>
</copy>
<copy id="createFile2" name="Create File 2" to="${some.dir}/file2.txt">
<input>
<buffer>
Test2
</buffer>
</input>
</copy>
<delete name="Delete All Test Files">
<files>
<files files="${some.dir}/*"/>
</files>
</delete>
</jobs>
</folder>
</jobs>
</sequential>
</job>
</oddjob>