Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

Technical Requirement

The JobScheduler must be installed including the Event-Service (JobChain sos/events/scheduler_event_service)

...

Szenario

In this example 7 reports (JobRep10 - JobRep70) are to be created which depends on different combinations of other successfully finished jobs (Job10 - Job43). Within these jobs we also have dependencies, so the predecessors of the reports are not finished at the same time and the reports have to wait before they can start.

...

All other jobs are started by orders which are created from the event handler.

Realisation

Definition of the job chains

Except the jobs in JobChain10 and JobChain20 all other jobs are packed seperately into job chains completed by steps for the creation of events. So we have at least 15 job chains.

...

Graphviz
digraph "EVENTS" {

graph [rankdir=LR size="14, 7"] 
node [fontsize=10 fontname=Arial]
ranksep=0.4
 
JobRep70 [style=filled,fillcolor=gold,shape=Mrecord,label="{{<RE>ev_JobRep20_JobRep70|<RC>ev_JobRep10_JobRep70|<RV>ev_JobRep30_JobRep70|<RF>ev_JobRep40_JobREp70}|{JobRep70 }}"]  
JobRep50 [style=filled,fillcolor=gold,shape=Mrecord,label="{{<FE3>ev_Job23_JobRep50|<FF2>ev_Job43_JobRep50|<VF3>ev_Job33_JobRep50|<FC3>ev_Job13_JobRep50}|{JobRep50}}"] 
JobRep60 [style=filled,fillcolor=gold,shape=Mrecord,label="{{<SC2>ev_Job11_JobRep60|<SE2>ev_Job21_JobRep60|<FS2>ev_Job41_JobRep60|<VS2>ev_Job31_JobRep60}|{JobRep60}}"] 

subgraph JobChain20 { 

node [style=filled,fillcolor=aquamarine] 
Job21    [shape=Mrecord, label="{Job21 |{<NOK>NOK|{<OK>OK|{<SE1>ev_Job21_JobRep20|<SE2>ev_Job21_JobRep60|<SE3>ev_Job21_Job31}}}}"] 
Job22    [shape=Mrecord, label="{Job22 |{<NOK>NOK|{<OK>OK|{<AE1>ev_Job22_JobRep20|<AE2>ev_Job22_Job32}}}}"] 
Job23    [shape=Mrecord, label="{Job23 |{<NOK>NOK|{<OK>OK|{<FE1>ev_Job23_JobRep20|<FE2>ev_Job23_Job33|<FE3>ev_Job23_JobRep50}}}}"]
JobRep20 [fillcolor=aquamarine3,shape=Mrecord, label="{{<SE1>ev_Job21_JobRep20|<AE1>ev_Job22_JobRep20|<FE1>ev_Job23_JobRep20}|JobRep20 |<RE>ev_JobRep20_JobRep70}"]

Job20 -> Job21 
Job20 -> Job23
Job20 -> Job22  

Job21:SE1 ->  JobRep20:SE1 
Job21:SE2 ->  JobRep60:SE2 
Job21:SE3 -> Job31:SE3

Job22:AE1 ->  JobRep20:AE1
Job22:AE2 ->  Job32:AE2

Job23:NOK-> Job33:FE2
Job23:FE1-> JobRep20:FE1
Job23:FE2-> Job33:FE2
Job23:FE3->  JobRep50:FE3

JobRep20:RE -> JobRep70:RE 
} 


subgraph JobChain10 { 
node [style=filled,fillcolor=cornsilk] 
Job11 [shape=Mrecord, label="{Job11 |{<NOK>NOK|{<OK>OK|{<SC2>ev_Job11_JobRep60|<SC1>ev_Job11_JobRep10|<SC3>ev_Job11_Job31}}}}"] 
Job12 [shape=Mrecord, label="{Job12 |{<NOK>NOK|{<OK>OK|{<AC1>ev_Job12_JobRep10|<AC2>ev_Job12_Job32}}}}"] 
Job13 [shape=Mrecord, label="{Job13 |{<NOK>NOK|{<OK>OK|{<FC1>ev_Job13_JobRep10|<FC2>ev_Job13_Job33|<FC3>ev_Job13_JobRep50}}}}"]
JobRep10 [fillcolor=cornsilk3,shape=Mrecord, label="{{<SC1>ev_Job11_JobRep10|<AC1>ev_Job12_JobRep10|<FC1>ev_Job13_JobRep10}|JobRep10 |<RC>ev_JobRep10_JobRep70}"]

Job10 -> Job12 
Job10 -> Job11 
Job10 -> Job13 

Job11:SC1 ->  JobRep10:SC1 
Job11:SC2 ->  JobRep60:SC2
Job11:SC3 -> Job31:SC3

Job12:AC1 ->  JobRep10:AC1
Job12:AC2 ->  Job32:AC2

Job13:NOK-> Job33:FC2
Job13:FC1-> JobRep10:FC1
Job13:FC2-> Job33:FC2
Job13:FC3->  JobRep50:FC3

JobRep10:RC -> JobRep70:RC 
} 

subgraph JobChain30 { 
node [style=filled,fillcolor=deepskyblue] 
Job33    [fillcolor=deepskyblue, shape=Mrecord, label="{{<FE2>ev_Job23_Job33|<FC2>ev_Job13_Job33}|Job33  |{<NOK>NOK|{<OK>OK|{<VF1>ev_Job33_Job43|<VF2>ev_Job33_JobRep30|<VF3>ev_Job33_JobRep50}}}}"] 
Job32    [fillcolor=deepskyblue, shape=Mrecord, label="{{<AE2>ev_Job22_Job32|<AC2>ev_Job12_Job32}|Job32  |{<NOK>NOK|{<OK>OK|{<VA1>ev_Job32_Job42|<VA2>ev_Job32_JobRep30}}}}"] 
Job31    [fillcolor=deepskyblue, shape=Mrecord, label="{{<SC3>ev_Job11_Job31|<SE3>ev_Job21_Job31}|Job31  |{<NOK>NOK|{<OK>OK|{<VS1>ev_Job31_Job41|<VS2>ev_Job31_JobRep60|<VS3>ev_Job31_JobRep30}}}}"] 
JobRep30 [fillcolor=deepskyblue, shape=Mrecord, label="{{<VS3>ev_Job31_JobRep30|<VA2>ev_Job32_JobRep30|<VF2>ev_Job33_JobRep30}|JobRep30 |<RV>ev_JobRep30_JobRep70}"]
JobRep40 [fillcolor=deepskyblue, shape=Mrecord, label="{{<FS1>ev_Job41_JobRep40|<FA1>ev_Job42_JobRep40|<FF1>ev_Job43_JobRep40}|JobRep40 |<RF>ev_JobRep40_JobREp70}"]

Job43  [fillcolor=deepskyblue, shape=Mrecord, label="{{<VF1>ev_Job33_Job43}|Job43  |{<FF1> ev_Job43_JobRep40|<FF2>ev_Job43_JobRep50}}}"] 
Job42  [fillcolor=deepskyblue, shape=Mrecord, label="{{<VA1>ev_Job32_Job42}|Job42  |<FA1>ev_Job42_JobRep40}}}"] 
Job41  [fillcolor=deepskyblue, shape=Mrecord, label="{{<VS1>ev_Job31_Job41}|Job41  |{<FS1>ev_Job41_JobRep40|<FS2>ev_Job41_JobRep60}}}"] 

Job41:FS1    -> JobRep40:FS1
Job41:FS2    -> JobRep60:FS2

Job42:FA1   -> JobRep40:FA1

Job43:FF1 -> JobRep40:FF1
Job43:FF2 -> JobRep50:FF2

Job31:NOK ->  Job41:VS1
Job31:VS1  ->  Job41:VS1
Job31:VS2  ->  JobRep60:VS2
Job31:VS3  ->  JobRep30:VS3

Job32:NOK ->  Job42:VA1
Job32:VA1 ->  Job42:VA1
Job32:VA2 -> JobRep30:VA2

Job33:NOK -> Job43:VF1
Job33:VF1  -> Job43:VF1
Job33:VF2  -> JobRep30:VF2
Job33:VF3  -> JobRep50:VF3

JobRep30:RV -> JobRep70:RV 
JobRep40:RF     -> JobRep70:RF 
}
}

Setting the Events in Job Chains

We define the job EventAdd using the JITL-class sos.scheduler.job.JobSchedulerSubmitEventJob 
to store the events into the database. Please notify that the standard configuration monitor is needed as post-processing.

...

  • ev_Job31_Job41
  • ev_Job31_JobRep60
  • ev_Job31_JobRep30

Creation of the orders in Event handler

The event handler is installed by using JOE: File --> New --> Event Handler.

...

Every event which is used in the condition has to be deleted from the database with the Command remove event.

Setting events in Event Handler

For the last report job chain JobRep70 we have a special situation. It is not necessary to wait until the four predecessor report jobs are finished but they have all been startet before jobRep70 can also starts. So we add the events for the last report in parallel to the start orders for the four reports JobChainRep10, JobChainRep20, JobChainRep30 and JobChainRep40 within the actions.

Controlling Events in JID (JobScheduler Information Dashboard)

For the controlling of the events you may use the JID component Events

...