Hi all,
Let's discuss Job Queue in Navision.
If you filter Navision database(till NAV 2009 R2) with @*Job Queue* you will find -
Now lets try to explorer these objects.
Table 1- Job Queue Setup.
Setup Table - used to set JOB Queue to Start / Stop.
Table 2 - Job Queue Process.
Keep Entries of Job Queue Session in the database (Based on No of services).
Table 3 - Job Queue Entry
Keep Entries of Job Queue we created for automatic execution.
Table 4 & 5 - Job Queue Response & Job Queue Log Entry.
Keeps results of Executed Jobs - success/failure/reason of failure.
All Forms/Pages are related to above tables for data entry/setup.
Codeunit 1 - Job Queue Dispatcher.
This Codeunit is used to automate the task and it will run all the jobs defined in Job Queue Entries table.
* This is the Codeunit that get executed when you specify "JOBQUEUE" as parameter during setup of NAS.
Codeunit 2 - Job Queue Start Codeunit.
If you open and drill down the Codeunit you will find that this Codeunit is used just to check the user rights before execution of a job.
If checks the user rights in Member Of (Database Login) & Windows Access Control (Windows Login).
One more thing -
If you check the onRUN Trigger of Codeunit "Job Queue Start Codeunit" you will find a code which says-
If object type is Report then execute it, but for Codeunit you need to specify the record variable.
While configuring NAS we had specified parameter as JOBQUEUE, which is used to automate the execution of process.
Let's see how NAS execute theses Jobs-
Design Codeunit 1 and navigate to function NASHandler.
This is the function that is called by the NAS Service created.
If you Drill down the function you will find out that this execute some objects based on the parameter passed.
IF Parameter contain 'CG' - Execute "BizTalk NAS Startup"
IF Parameter Contain 'ADCS' - Execute "ADCS NAS Startup"
IF Parameter Is 'NEP' -Execute "Employee Portal"
IF Parameter is 'MOB' - Execute Mobile Dispatcher.
IF Parameter is 'OSYNCH','JOBQUEUE' - Execute "Job Queue Dispatcher".
So now we know we had specified JOBQUEUE as parameter in NAS so it will execute the Job Queue Dispatcher which will then execute all the jobs in Job Queue Entries.
In Next post we will see -
a) How to create a job.
b) How to schedule it.
c) A Test job.
Just think of its uses.
"A Job like Adjust Cost - Item Entries which take time can be automated via NAS to run monthly on weekends.
Regards,
Saurav Dhyani
Let's discuss Job Queue in Navision.
If you filter Navision database(till NAV 2009 R2) with @*Job Queue* you will find -
- 5 Tables.
- 6 Forms & Pages.
- 2 Codeunits.
Now lets try to explorer these objects.
Table 1- Job Queue Setup.
Setup Table - used to set JOB Queue to Start / Stop.
Table 2 - Job Queue Process.
Keep Entries of Job Queue Session in the database (Based on No of services).
Table 3 - Job Queue Entry
Keep Entries of Job Queue we created for automatic execution.
Table 4 & 5 - Job Queue Response & Job Queue Log Entry.
Keeps results of Executed Jobs - success/failure/reason of failure.
All Forms/Pages are related to above tables for data entry/setup.
Codeunit 1 - Job Queue Dispatcher.
This Codeunit is used to automate the task and it will run all the jobs defined in Job Queue Entries table.
* This is the Codeunit that get executed when you specify "JOBQUEUE" as parameter during setup of NAS.
Codeunit 2 - Job Queue Start Codeunit.
If you open and drill down the Codeunit you will find that this Codeunit is used just to check the user rights before execution of a job.
If checks the user rights in Member Of (Database Login) & Windows Access Control (Windows Login).
One more thing -
If you check the onRUN Trigger of Codeunit "Job Queue Start Codeunit" you will find a code which says-
If object type is Report then execute it, but for Codeunit you need to specify the record variable.
While configuring NAS we had specified parameter as JOBQUEUE, which is used to automate the execution of process.
Let's see how NAS execute theses Jobs-
Design Codeunit 1 and navigate to function NASHandler.
This is the function that is called by the NAS Service created.
If you Drill down the function you will find out that this execute some objects based on the parameter passed.
IF Parameter contain 'CG' - Execute "BizTalk NAS Startup"
IF Parameter Contain 'ADCS' - Execute "ADCS NAS Startup"
IF Parameter Is 'NEP' -Execute "Employee Portal"
IF Parameter is 'MOB' - Execute Mobile Dispatcher.
IF Parameter is 'OSYNCH','JOBQUEUE' - Execute "Job Queue Dispatcher".
So now we know we had specified JOBQUEUE as parameter in NAS so it will execute the Job Queue Dispatcher which will then execute all the jobs in Job Queue Entries.
In Next post we will see -
a) How to create a job.
b) How to schedule it.
c) A Test job.
Just think of its uses.
"A Job like Adjust Cost - Item Entries which take time can be automated via NAS to run monthly on weekends.
Regards,
Saurav Dhyani
Comments
Post a Comment