Friday, February 5, 2010

Project Server Queue System support in FluentPS

Most of Project Server actions run asynchronously. Every asynchronous action becomes a separate job in queue. You can check them in the “Server Settings”->”Manage Queue Jobs” section on your PWA site. To manage the queue MS Project Server has a special Queuing system service, which works as a separate process. QueueSystem web service from PSI allows developers to communicate with the queue. There is a nice article on MSDN about QueueSystem you may check for more details.( http://msdn.microsoft.com/en-us/library/ms461006.aspx)

We added Project Server queue system support to FluentPS lib, and you can wait for job completion by using WaitForQueue method of the PSQueueSystemService class. So to wait for some operation you can do something like:

var queueService = new PSQueueSystemService(logService, sessionService);
var jobId = projectsService.CheckIn(project.Uid, Guid.NewGuid());
// wait for queue
queueService.WaitForQueue(jobId);

For complete example source code please check EntityMapping project from FluentPS samples solution.

3 comments: