mibuso.com

Microsoft Business Solutions online community
It is currently Fri May 24, 2013 5:58 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 109 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Tue Jan 05, 2010 10:22 am 
Offline

Joined: Thu Sep 07, 2006 11:58 am
Posts: 471
Location: Mendrisio
Country: Switzerland (ch)
Are 2 granules of NAS compulsory or only the one standard is enought?

The configuration is only 1 server with SQL Server 2008 and NASSQL on same machine. The database from which to run NASQL is only 1 but the companies to connect are 2.

Thank you very much.


Top
 Profile  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Tue Jan 05, 2010 12:56 pm 
Offline

Joined: Tue May 06, 2008 2:56 pm
Posts: 350
Location: Walton-On-Thames
Country: United Kingdom (uk)
Okay, summary time (aka RTFT).

One NAS can only run in one company at a time.

There are several hacks to allow the company a NAS is in to be changed 'on the fly' but they all need the NAS to be restarted/reloaded which can take upto a minute to complete. The simplest is to use a batch file from the windows task scheduler.

The NAV2009 version is different in that runs the actual job code using the NAV 2009 web service (service) the NAS still runs in one of the companies but the task isn't run directly by the NAS.

See the rest of this thread for the various methods.

_________________
Robert de Bath
TVision Technology Ltd


Top
 Profile  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Tue Jan 05, 2010 1:28 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Tue Jul 19, 2005 4:49 pm
Posts: 3849
Location: Olst
Country: Netherlands (nl)
rdebath wrote:
The NAV2009 version is different in that runs the actual job code using the NAV 2009 web service (service) the NAS still runs in one of the companies but the task isn't run directly by the NAS.



What do you mean with this? AFAIK they have not changed the NAS in 2009 and you do not need webservices for the Job Queue.

Webservices does not even have a time mechanism but is event driven.

_________________
Mark Brummel | Freelance Dynamics NAV (Navision) Developer
Author of the book : Microsoft Dynamics NAV 2009 Application Design

MY BLOG : http://www.brummelds.com


Top
 Profile E-mail WWW  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Tue Jan 05, 2010 1:32 pm 
Offline

Joined: Tue May 06, 2008 2:56 pm
Posts: 350
Location: Walton-On-Thames
Country: United Kingdom (uk)
I mean Rashed's (ara3n) contribution in this thread.

ie: the link to http://www.mibuso.com/forum/viewtopic.php?f=32&t=31476

_________________
Robert de Bath
TVision Technology Ltd


Top
 Profile  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Wed Jan 06, 2010 11:27 am 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Tue Jul 19, 2005 4:49 pm
Posts: 3849
Location: Olst
Country: Netherlands (nl)
Ah I see. Missed that sorry.

I agree that it is interesting to try and do this. Currently I am working on a project where I want an interface to be event driven rather than timer driven.

I'll explore this idea. Thanks.

_________________
Mark Brummel | Freelance Dynamics NAV (Navision) Developer
Author of the book : Microsoft Dynamics NAV 2009 Application Design

MY BLOG : http://www.brummelds.com


Top
 Profile E-mail WWW  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Wed Jan 06, 2010 4:09 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Wed Dec 15, 2004 6:11 pm
Posts: 8701
Location: 3rd rock from sun
Country: United States (us)
Mark you are not following my blog? :mrgreen:

_________________
Rashed.

blog: http://mibuso.com/blogs/ara3n/


Top
 Profile  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Wed Jan 06, 2010 4:17 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Tue Jul 19, 2005 4:49 pm
Posts: 3849
Location: Olst
Country: Netherlands (nl)
I try, but it is not published on dynamicsusers.org so I have to think about it manualy. ](*,)

I should start using rss.

It's a good blog with creative ideas.

_________________
Mark Brummel | Freelance Dynamics NAV (Navision) Developer
Author of the book : Microsoft Dynamics NAV 2009 Application Design

MY BLOG : http://www.brummelds.com


Top
 Profile E-mail WWW  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Wed Jan 06, 2010 4:30 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Wed Dec 15, 2004 6:11 pm
Posts: 8701
Location: 3rd rock from sun
Country: United States (us)
Use google reader.

I only go to google reader and stopped going to any site. All my rss feed are there and it saves me a lot of time.

_________________
Rashed.

blog: http://mibuso.com/blogs/ara3n/


Top
 Profile  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Mon Mar 08, 2010 9:41 pm 
Offline

Joined: Mon Feb 22, 2010 12:46 pm
Posts: 4
Country: Netherlands (nl)
Hi ara3n,

Great solution. Works fine with SQL version.

Has anyone got this working for native version?
I have tried to get it working for native version, by modifying trigger RunNasForOtherCompany in Codeunit 50000 Run NAS Accross Company as follows:
...
//Server variable does not exist
//Server.SETRANGE("My Server",TRUE);
//Server.FINDFIRST;
.....
//txtCommand := 'NASSQL servername=' + Server."Server Name" + ','+
txtCommand := 'NAS servername=' + 'SERVER01' + ','+
'company=' + JobQueueEntry."Company Name" + ','+
'nettype=TCP,startupparameter=' + 'JOBQUEUE2|'+COMPANYNAME+'|'+FORMAT(JobQueueEntry.ID);
...

Unfortunately, this does not work; the second NAS session is not created.
Running this code in command prompt did not give a result either, as the JobQueueEntry.ID does not exist.

Anyone have an idea?


Top
 Profile E-mail  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Tue Mar 09, 2010 3:27 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Wed Dec 15, 2004 6:11 pm
Posts: 8701
Location: 3rd rock from sun
Country: United States (us)
change JobQueueEntry.ID to the PK of a JobQueueEntry Card.

_________________
Rashed.

blog: http://mibuso.com/blogs/ara3n/


Top
 Profile  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Thu Mar 18, 2010 9:17 pm 
Offline

Joined: Mon Feb 22, 2010 12:46 pm
Posts: 4
Country: Netherlands (nl)
Hi ara3n,
Thank you for your help.

I have tried these 2 options:
....
'nettype=TCP,startupparameter=' + 'JOBQUEUE2|'+COMPANYNAME+'|'+FORMAT('{60BC78D8-DE83-42F4-B872-999D663DF62B}');
OR
'nettype=TCP,startupparameter=' + 'JOBQUEUE2|'+COMPANYNAME+'|'+'{60BC78D8-DE83-42F4-B872-999D663DF62B}';

but the 2nd NAS session is never made; cu50000 is not run; I have put several messages in codunit 1 and codeunit 50000, but they are not called.
Other options?

Best regards,
William


Top
 Profile E-mail  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Fri Mar 19, 2010 5:59 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Wed Dec 15, 2004 6:11 pm
Posts: 8701
Location: 3rd rock from sun
Country: United States (us)
Can you try and start nas from command prompt with just jobqueue parameter?

_________________
Rashed.

blog: http://mibuso.com/blogs/ara3n/


Top
 Profile  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Fri Mar 19, 2010 2:49 pm 
Offline

Joined: Mon Feb 22, 2010 12:46 pm
Posts: 4
Country: Netherlands (nl)
Hi ara3n,

I just got it working.

I have put the following in cmd prompt:
NAS servername=XBI-LAP106, company="CRONUS Nederland BV",nettype=TCP,startupparameter="JOBQUEUE2|"CRONUS Nederland BV"|"{60BC78D8-DE83-42F4-B872-999D663DF62B}"

Then I got the message that an EXIT was done in CU 50000:
....
IF NOT Company.GET(txtFromCompany) THEN BEGIN
MESSAGE(txtFromCompany);
EXIT;
END;
....
which means that company "CRONUS Nederland BV" does not exist.
I have changed the companyname to UPPERCASE "CRONUS NEDERLAND BV" and it works.

How to solve uppercase problem?
In Codeunit 1, the parameter is converted to uppercase.
ParamStr := UPPERCASE(NASID);

Then it is passed to codeunit 50000, as uppercase
CU50000.SetParameter(Parameter);

Then in codunit 50000 OnRun, the uppercase company is never found, and exit is called
IF NOT Company.GET(txtFromCompany) THEN BEGIN
MESSAGE(txtFromCompany);
EXIT;
END;

I have modified codunit 1 to get it working with lowercase:
//MOD01 Start
IF (COPYSTR(Parameter,1,9) = 'JOBQUEUE2') THEN BEGIN
//CU50000.SetParameter(Parameter);
CU50000.SetParameter(NASID);
CU50000.RUN;
CGNASStartedinLoop := TRUE;
END;
//MOD01 End

This works fine.
Thank you very much.

Best regards,
William


Top
 Profile E-mail  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Fri Mar 19, 2010 11:45 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Wed Dec 15, 2004 6:11 pm
Posts: 8701
Location: 3rd rock from sun
Country: United States (us)
That's great that you got it solved.

_________________
Rashed.

blog: http://mibuso.com/blogs/ara3n/


Top
 Profile  
 
 Post subject: Re: Job Queue for Unlimited Company
PostPosted: Wed Apr 07, 2010 4:55 pm 
Offline

Joined: Mon Feb 22, 2010 12:46 pm
Posts: 4
Country: Netherlands (nl)
Hi ara3n,

Have you tried second NAS for running (complex) reports?
Or did you only test codeunits?

We noticed that the second NAS cannot run reports with multiple indent, like for example:
Job
...Job Ledger Entry

Simple reports without indent work well with second NAS (for example adding an Item in table 27).

It is not clear why.
Do you have any idea?

Best regards,
William


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 109 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: