...
Flowchart |
---|
job_chain [label="Job Chain\ntriggered by File Orders\nor Ad Hoc Orders",fillcolor="orange"] job_sorter [label="Job Order Sorter",fillcolor="lightskyblue"] job_next_job [label="Next Job", fillcolor="lightskyblue"] sorter_orders_completed [shape=diamond,label="list of orders completed?",fillcolor="white"] order_suspend [label="Suspend Order",fillcolor="white"] order_sort [label="Sort Orders",fillcolor="white"] order_C [shape="ellipse",label="File Order C\n ",fillcolor="violet"] order_B [shape="ellipse",label="File Order B\n ",fillcolor="violet"] order_A [shape="ellipse",label="File Order A\n ",fillcolor="violet"] order_suspend [label="Suspend Orders",fillcolor="white"] order_A -> job_chain order_B -> job_chain order_C -> job_chain job_chain -> job_sorter job_sorter -> sorter_orders_completed sorter_orders_completed -> joborder_next_jobsort [label=" yes "] sorter_orders_completed -> order_suspend [label=" no "] order_suspend -> job_sorter order_sort -> job_next_job |
Implementation
Components
- The solution implements a job
sorter
that can be added to the top of any job chain.- This job implements a
spooler_process()
function that suspends all incoming orders. - This job is configured for one task and with an idle timeout attribute, i.e. it executes incoming orders sequentually.
- After the last order this job waits for the duration specified with the
idle_timeout
attribute for new orders.- The idle timeout is configured by
<job idle_timeout="10">
with thesorter
job definition. - With the idle timeout being expired this job will execute its
spooler_exit()
function and will sort all orders that have previously been suspended.- Sorting is done in alphabetical order.
- The orders are reinserted to the next job node that follows the
sorter
job in the job chain.
- The idle timeout is configured by
- This job implements a
- The sample included makes use of a job chain
job_chain1
that includes the job nodes for thesorter
job and ahello
job.
...