lucasalexander / AlexanderDevelopment.ProcessRunner

This is an open source Dynamics CRM solution for scheduling and executing recurring workflows
http://alexanderdevelopment.net/
Apache License 2.0
24 stars 8 forks source link

Error Preventing Plugin From Running #4

Open JoelAbbottxRM opened 5 years ago

JoelAbbottxRM commented 5 years ago

Hi Alexander!

First of all, thanks for such an awesome solution! I am having a bit of trouble getting it to run :) On my recurring workflow runner i get the following error:

An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): AlexanderDevelopment.WorkflowScheduler.RunScheduledWorkflows: System.TimeoutException: Couldn’t complete execution of the custom activity AlexanderDevelopment.WorkflowScheduler.RunScheduledWorkflows plug-in within the 2-minute time limit.

Any suggestions? Thanks!

lucasalexander commented 5 years ago

This suggests you have a large number of records, and the process runner can't get through them all in two minutes. Could you try making the query more restrictive to see it that works? One example approach I recommend is if you are running the process on contacts, set up two scheduled jobs - one for contacts whose names start with A-M and another one for contacts whose names start with N-Z.

JoelAbbottxRM commented 5 years ago

Thanks for coming back to me but i dont think thats the issue. Its only a very small number of records (10-30, max 100 each time)

lucasalexander commented 5 years ago

Are you executing a synchronous or background workflow?

JoelAbbottxRM commented 5 years ago

Background, but i think i may have found the issue. I think there was an error in my FetchXML that meant it was indeed bringing in too many records. I'll test and confirm. Thanks!