Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
In the sample below there are two different approaches described how you can start jobs on a file event.
...
- Orders can not have additional parameters
- Order processing starts when the file is detected, not after the file is completely written
No Format |
---|
<mscgen> |
...
//file_order_source |
...
msc { |
...
No Format |
---|
width1. width="800"; FileSystem [label="File System", |
...
textcolour="maroon", arctextcolour="maroon"], |
...
No Format |
---|
JobScheduler [labeh1. label="JobScheduler", textcolour="navy", arctextcolouh1. arctextcolour="navy"], Order [label="FileOrder", textcolouh1. textcolour="brown", arctextcolour="brown"], |
...
JobChain [label="JobChain", textcolour="orange", |
...
arctextcolour="orange"]; |
...
No Format |
---|
JobScheduler>JobScheduler => FileSystem [labelh1. label = "(1) start file watching" ]; FileSystem .. JobChain [ label = "waiting for files " ]; |
...
FileSystem => JobScheduler [ label = "(2) file arrived" ]; |
...
No Format |
---|
JobSchedulerh1.JobScheduler => Order [ label = "(3) start order processing" ]; Orderh1.Order => JobChain [ label = "(4) start node" ]; JobChainh1.JobChain => JobChain [ label = "(5) start next node(s)" ]; JobChainh1.JobChain => Order [ label = "(6) end jobChain" ]; Orderh1.Order => JobScheduler [ label = "(7) process file sink" ]; JobSchedulerh1.JobScheduler => FileSystem [ label = "(8) delete/move file" ]; FileSystem .. JobChain [labelh1. label = "repeat waiting for files " ]; } |
...
</mscgen> |
Using JITL Job JobSchedulerExistsFile
See also Documentation
No Format |
---|
<mscgen> |
...
//file_order_event |
...
msc { |
...
No Format |
---|
width="900";
|
...
JobScheduler [label="JobScheduler", textcolour="navy", |
...
arctextcolour="navy"], |
...
No Format |
---|
JobChainPoll [label="JobChain Polling", textcolouh1. textcolour="orange", arctextcolour="orange"], OrderPoll [labeh1. label="Order for Pollling", textcolour="brown", arctextcolouh1. arctextcolour="brown"], FileSystem [label="File System", textcolouh1. textcolour="maroon", arctextcolour="maroon"], JobChainProcessing [labeh1. label="JobChain Processing", textcolour="orange", arctextcolouh1. arctextcolour="orange"], OrderProcessing [label="Order for Processing", textcolouh1. textcolour="brown", arctextcolour="brown"]; |
...
JobScheduler => JobChainPoll [ label = "(1) start order for file watching" ]; |
...
No Format |
---|
JobScheduler .. FileSystem [labelh1. label = "waiting for files " ]; |
...
OrderPoll => FileSystem [ label = "(2) polling" ]; |
...
No Format |
---|
FileSystem FileSystem>=> OrderPoll [labelh1. label = "(3) file arrived" ]; OrderPoll>OrderPoll => JobChainProcessing [labelh1. label = "(4) create order for processing" ]; OrderProcessing>OrderProcessing => OrderProcessing [labelh1. label = "(5) check for ready state" ]; |
...
OrderProcessing => JobChainProcessing [ label = "(6) start node" ]; |
...
No Format |
---|
OrderProcessing>OrderProcessing => JobChainProcessing [labelh1. label = "(7) start next node(s)" ]; OrderProcessing OrderProcessing>=> JobChainProcessing [labelh1. label = "(8) end jobChain" ]; OrderProcessing>OrderProcessing => JobChainProcessing [labelh1. label = "(9) process file sink" ]; JobChainProcessing JobChainProcessing>=> FileSystem [labelh1. label = "(10) delete/move file" ]; JobScheduler .. FileSystem [ label = "repeat waiting for files " ]; OrderPollh1.OrderPoll => FileSystem [ label = "(11) polling" ]; } |
...
</mscgen> |
the job chain "job_chain_file_order_source_poll" uses the job JobSchedulerExistsFile to check, wether a file is in c:\temp\input ending with .pdf. If so, for each file found, an order will be created for the job chain job_chain_file_order_source. The file be erased by the sinks in the executed job chain.
...