Encountering errors when running concurrent processes

Jan 28, 2012 at 12:21 AM

We've been setting up some jobs using this plugin in our CRM 2011 installation (very helpful plugin, by the way!) and have been encountering some problems when running multiple jobs concurrently. For testing, I have a job set up that runs on the Contact record and triggers another job using this plugin against a related entity. If I just run the job against a single Contact, it runs completely as expected. However, if I run it against a set of Contacts (say from an advanced find) more than half of the jobs will fail with an assortment of error messages. The jobs spawned by the plugin all claim to have run successfully, but the main job displays an error message (typically something related to an SQL error) and nothing the sub-jobs were supposed to do has taken effect.

I've searched online, but I haven't found anything helpful so far, and I'm not even sure if it's a problem with this plugin specifically or CRM in general. Can someone shed any additional light on this problem? I would appreciate any assistance with this one. We have our workflow setup working almost perfectly, except for this odd issue when jobs collide.

If I can help by providing any additional information, including some of the specific error messages if they would be of help, just let me know. Thanks!

Jan 31, 2012 at 1:48 PM

Hi, very interesting feedback. I "think" I might know what the problem is, but I need to investigate it and it would be greatly appreciated if you could test out my patch. I found a very similar problem some time ago, and I just have to make sure that it is indeed the same problem. Here's the article explaining the issue, see if it rings a bell: http://xrm2011.wordpress.com/2011/08/29/objectdisposedexception-on-custom-workflow-activities/

I've created a patch version that I'd like you to test if at all possible. Unfortunately I don't have a lot of time to test it extensively now, but as long as you don't use this straight into a production environment it would be quite safe.

Here it is: http://crm2011distributewf.codeplex.com/releases/view/81453

Thank you and let me know!

Jan 31, 2012 at 2:43 PM

That does sound a lot like the problem we're having. As I said, I've seen a handful of different error messages but "object disposed" was definitely one of them. If a class is becoming corrupted, that would definitely explain the apparently random nature of the behavior.

I'd be more than happy to test out the newest version in our test environment and see if it resolves the problem, but when I click the link you provided it just says that the specified release was not found. Is there another location I should retrieve it from? I don't see a newer download under the Downloads tab.

Thank you very much for the assistance, I greatly appreciate it!

Jan 31, 2012 at 10:36 PM

Hi, sorry about that, I thought that even if I did not publish the release it would be accessible via direct link. Now you should be able to access it. Greatly appreciate your assistance.

Feb 7, 2012 at 11:22 PM

We've been running this latest version on our test server with very good success for several days now. It's completely eliminated the problem I described above as we haven't had any jobs utilizing this plugin that have failed since upgrading. Much appreciated!

However, I did notice one curious thing. When running a workflow containing this plugin on a large number of records (~250) all of the workflows succeeded. However, a small number of the workflows spawned by the plugin (~6) did not appear to run at all. There was no indication that the workflow ran, nor did the intended action take place. I realize this is a rather vague problem report, but I'm still trying to track down a commonality as there was no apparent pattern to what happened. I thought I'd mention it in case you had any further ideas or thoughts regarding it.

Thanks for your help!