mibuso.com

Microsoft Business Solutions online community
It is currently Fri May 24, 2013 12:55 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 62 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Wed Jan 28, 2009 5:33 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)
I had posted on mibuso a while back on how to use two NAS instances to run job queue for unlimited amount of companies. Here is the link

viewtopic.php?f=7&t=22633. You had to purchase an additional NAS user license in order to use it. Dynamics NAV 2009 comes with web service, and you can publish any Code unit or Page by default. You will need to purchase one user but for webservice, but it much cheaper. In this blog, I will show you how to setup JOB QUEUE to schedule to run jobs across companies. The advantages of using Web Services is that you can run multiple jobs at the same time for multiple companies. What I’ve experienced with NAV 2009 Web Service is that once you call a web service function, you can disconnect and Service Tier will finish the job and commit the transaction.

In addition you don’t have to modify any processing/posting jobs that have dialog windows displayed. The Service tier simply ignores them. For example you can run adjust cost report without modifying any objects from Job queue. In addition, the solution I’ve created does not modify any existing objects!!!

You can download the fob and read more about it on my blog.
http://mibuso.com/blogs/ara3n/2009/01/2 ... companies/

_________________
Rashed.

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


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Thu Jan 29, 2009 7:36 am 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12265
Location: Brno
Country: Czech Republic (cz)
What to say... =D> =D> =D> 8)

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Thu Jan 29, 2009 9:45 am 
Offline

Joined: Fri Oct 26, 2007 1:07 pm
Posts: 27
Location: AUS
Country: Australia (au)
Top quality.


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Thu Jan 29, 2009 9:59 am 
Offline

Joined: Mon Mar 08, 2004 2:42 pm
Posts: 3255
Location: Hannover
Country: Germany (de)
if i click on the link, the following message is displayed

Quote:
WordPress database error: [Table 'vadysoft_mibusoblogs.wp_38_ras_count' doesn't exist]
INSERT INTO wp_38_ras_count (id) VALUES (NULL)

WordPress database error: [Table 'vadysoft_mibusoblogs.wp_38_ras_image' doesn't exist]
INSERT INTO wp_38_ras_image (id, createtime, word) VALUES (0, 1233215879, 'w6x27rn')

WordPress database error: [Table 'vadysoft_mibusoblogs.wp_38_ras_count' doesn't exist]
DELETE FROM wp_38_ras_count WHERE id = 0

_________________
Do you make it right, it works too!


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Thu Jan 29, 2009 10:43 am 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Fri Dec 06, 2002 11:50 am
Posts: 3390
Location: Kontich, Belgium
Country: Belgium (be)
The idea is great! =D>

But I have to think it through though... because when scheduling codeunits through web services ... what about the lack of optimistic concurrency?

_________________

Eric Wauters
MVP - Microsoft Dynamics NAV
My blog


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Thu Jan 29, 2009 2:18 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)
garak wrote:
if i click on the link, the following message is displayed

Quote:
WordPress database error: [Table 'vadysoft_mibusoblogs.wp_38_ras_count' doesn't exist]
INSERT INTO wp_38_ras_count (id) VALUES (NULL)

WordPress database error: [Table 'vadysoft_mibusoblogs.wp_38_ras_image' doesn't exist]
INSERT INTO wp_38_ras_image (id, createtime, word) VALUES (0, 1233215879, 'w6x27rn')

WordPress database error: [Table 'vadysoft_mibusoblogs.wp_38_ras_count' doesn't exist]
DELETE FROM wp_38_ras_count WHERE id = 0


I've uploaded in here as well

http://sites.google.com/site/ara3nfiles ... edirects=0

_________________
Rashed.

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


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Thu Jan 29, 2009 2:28 pm 
Offline
Site Admin
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Sun Nov 07, 1999 8:01 am
Posts: 3294
Location: Wilrijk
Country: Belgium (be)
Blog is working now. I fixed the missing tables.

_________________
No support using PM or e-mail - Please use this forum.
Search is your friend || Mark your Topic as SOLVED (= green checkmark) when your question is answered || Read the Forum Rules before making a posting

»»» Mark your calendar: NAV TechDays 2013 - 7 & 8 November 2013 ««« Visit the conference website: www.navtechdays.com


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Fri Jan 30, 2009 4:46 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)
I also submitted it to the download section on mibuso.

_________________
Rashed.

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


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Fri Jan 30, 2009 7: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)
Waldo wrote:
The idea is great! =D>

But I have to think it through though... because when scheduling codeunits through web services ... what about the lack of optimistic concurrency?



could you clarify?

_________________
Rashed.

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


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Mon Feb 02, 2009 12:24 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Fri Dec 06, 2002 11:50 am
Posts: 3390
Location: Kontich, Belgium
Country: Belgium (be)
Well, simple ... when two users are running the same webservice, and that web service is a codeunit in NAV ... there is no optimistic concurrency. You have to handle this manually.

_________________

Eric Wauters
MVP - Microsoft Dynamics NAV
My blog


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Mon Feb 02, 2009 1:33 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12265
Location: Brno
Country: Czech Republic (cz)
It will be handled in same way, as when you run these two codeunits in two different clients. There is nothing specific for WebServices in this... ot it is? :-k

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Mon Feb 02, 2009 1:36 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Fri Dec 06, 2002 11:50 am
Posts: 3390
Location: Kontich, Belgium
Country: Belgium (be)
yes there is.
You won't get the message "the record has been changed since you last read it from the table...". No version control.

Or at least, this has been told to me...

_________________

Eric Wauters
MVP - Microsoft Dynamics NAV
My blog


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Mon Feb 02, 2009 3:41 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)
I just tested it and I do get the error.


Code: Select all
Another user has modified the record for this Item after you retrieved it from the database.  Enter your changes again in the updated window, or start the interrupted activity again.  Identification fields and values:  No.='1000'


From webservice.

My test codeunit looked like this.

Code: Select all
Item.GET('1000');
SLEEP(10000);

Item.VALIDATE(Description,'Bicycle WS');
Item.MODIFY;



So while the WS was waiting I modified the description on the item with another client.

_________________
Rashed.

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


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Mon Feb 02, 2009 4:59 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Fri Dec 06, 2002 11:50 am
Posts: 3390
Location: Kontich, Belgium
Country: Belgium (be)
Sorry guys, I can't get into too much of detail .. it's just a warning I have been given a couple of times.
I wish a Microsoft dude (freddy? :wink:) would stick his nose into this issue, because also I would like to know the details of it ... .

_________________

Eric Wauters
MVP - Microsoft Dynamics NAV
My blog


Top
 Profile  
 
 Post subject: Re: Job Queue through NAV Webservice for mulitple Companies
PostPosted: Tue Feb 03, 2009 11:19 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)
So how do we get his attention? 8)

_________________
Rashed.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 62 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: gravecz and 12 guests


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: