NAV2013 R2 Job Queue

jayhworldjayhworld Member Posts: 4
edited 2015-07-04 in NAV Three Tier
Experts,

I have setup NAS and jobs to run the code units to process the data from the table. The issue which i am running into is, NAS is not processing any new data until i restart NAV service. When i look at the job queue log entries, i can see jobs are running based on their schedule but for some reason code is not seeing any new data which are appearing into table.

Once i restart NAV service, job is processing new data. Can any one provide any suggestion to fix this?

Thanks,
JAYESH PATEL

Comments

  • DenSterDenSter Member Posts: 8,307
    Sounds to me like you don't have a loop in your codeunit. Take a look at the NAS startup codeunit (codeunit 450) to see an example of how to put the code in a loop.
  • jayhworldjayhworld Member Posts: 4
    Thanks for the reply.

    I am not sure how this is related to loop in a code unit.
    After restarting NAV service, all the the data are processing correctly.

    Thanks.
    JAYESH PATEL
  • DenSterDenSter Member Posts: 8,307
    You are running a codeunit in NAS. This codeunit correctly processes the data once, but does not pick up new data. You are saying that when you restart NAS, it correctly reads the new data again, but again does not pick up new data. It sounds to me that your codeunit, when it runs, only reads the data once. You can get your codeunit to repeat the read (which is necessary to read the new data) by creating a loop that reads the data, sleeps for a bit, and then reads the data again, sleeps for a bit, etcetera.
  • satbirsatbir Member Posts: 33
    Check if RESET is missing.
  • jayhworldjayhworld Member Posts: 4
    Thanks for the reply.

    Yes I have confirmed my code unit and i am doing repeat..until to process all the data in the table. The job sets to run every 1 min. In addition i am also doing reset before repeat until loop.
    Here is more details what is going on...

    - I am checking one Boolean field in the table once data appear into the table.
    - In a min sometimes i can see 50 to 100 raw new data in the table.
    - Once data appear in the table code unit which sets to run every 1 min mark that Boolean field in the table.
    - Say there are 100 raw (new data) in the table. When i restart NAV service it is processing all 100 raw data and mark that Boolean field.
    - But if new data appear in the table 1 or 100, until i restart NAV service, it is not seeing any new data in the table.

    Hope this help to understand my situation. In addition to this, I did same kind of thing in NAV 2009 R2 and it is working correctly. We are now implementing process in NAV 2013 R2 and having issue.
    JAYESH PATEL
  • OldNavDogOldNavDog Member Posts: 88
    I see you said you did a RESET before your REPEAT..UNTIL loop. That will simply remove any FILTERS on the Table.

    IIRC, You might try a SELECTLATESTVERSION at the top if your Codeunit. In fact, I found a MIBUSO thread on this very subject.

    http://www.mibuso.com/forum/viewtopic.php?f=32&t=59981
    Experience is what you get, when you don't get what you want. --Anon.
Sign In or Register to comment.