locked
Workflow System Job Errors RRS feed

  • Question

  • Hi,

    I am running into this error and wondering if anyone have any ideas as to what could be causing this.

    I have a workflow setup that basically changes the status of the e-mail activity instance when it gets created, but I have tried different tasks in the workflow and the same error is generated.  Please see below for the error:

    Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request. Detail: <detail><error> <code>0x80040265</code> <description>Error: No `Roles Found for user : e7840e00-b7a5-4f47-8fbf-73b7a94b4dc4</description> <type>Platform</type> </error></detail> at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Microsoft.Crm.SdkTypeProxy.CrmService.RetrieveMultiple(QueryBase query) at Microsoft.Crm.Asynchronous.SdkTypeProxyCrmServiceWrapper.RetrieveMultiple(QueryBase query) at Microsoft.Crm.Asynchronous.UpdateContractStatesOperation.ExpireContracts() at Microsoft.Crm.Asynchronous.UpdateContractStatesOperation.DoUpdateContractStatesOperation() at Microsoft.Crm.Asynchronous.UpdateContractStatesOperation.InternalExecute(AsyncEvent asyncEvent) at Microsoft.Crm.Asynchronous.AsyncOperationCommand.Execute(AsyncEvent asyncEvent) at Microsoft.Crm.Asynchronous.AsyncHostHandler.Handle(AsyncEvent asyncEvent) at Microsoft.Crm.Asynchronous.QueueManager.PoolHandler.ProcessAsyncEvent(AsyncEvent asyncEvent)


    This error results were generated from an Advanced Find view that included the Error Code and Message columns.  It looks like the user "e7840e00-b7a5-4f47-8fbf-73b7a94b4dc4" has no role and it is affecting the workflow.  However when I looked at all the users in CRM, none of them has this GUID.  Any ideas what might be causing these errors?

    Any help on this would be greatly appreciated.  Thanks!


    SL
    Tuesday, December 15, 2009 3:31 PM

Answers

  • The answer is yes, the operation you attempted in the Workflow is not available for the SYSTEM user to perform.

    It should be noted, however, that a Workflow executes in the  context of the specific, calling system user (this is the Workflow's owner if its triggered automatically, or the caller of the manual execution).  This is, in effect, impersonation done by the Workflow.  So, if you've written a custom Workflow Activity that makes a web service call without inheriting this impersonation, you have defaulted back to the "SYSTEM" user.
    Dave Berry
    Tuesday, December 15, 2009 10:01 PM
    Moderator

All replies

  • If your "SYSTEM" user is trying to execute certain functions that require certain roles, then you may need to impersonate another administrative or rights-authorative user before executing the function that's causing this problem.  Chances are that GUID belongs to the "SYSTEM" user, which is not visible by the standard Enabled Users list.  From the SDK:

    "When a value of false is passed to the CreateCrmService method or the CreateMetadataService method, the platform uses the built-in "system" account to execute Web service method calls made by your plug-in code. The "system" account is a high privilege user account with some restrictions. For example, the "system" account cannot create a task activity."
    Dave Berry
    Tuesday, December 15, 2009 6:36 PM
    Moderator
  • Hi Dave,

    Thanks for your input.  Turns out that the associated user is in fact the SYSTEM user.  So this error basically means that the SYSTEM user is not part of a role that would have permissions to perform the operations that were involved in the workflow?

    How would impersonating be done for a workflow using the web interface?

    I just find it strange that the system account would not have permissions to execute the workflows.  I have tried to run several different workflows for the e-mail entity and it would act the same way.

    SL
    Tuesday, December 15, 2009 8:43 PM
  • The answer is yes, the operation you attempted in the Workflow is not available for the SYSTEM user to perform.

    It should be noted, however, that a Workflow executes in the  context of the specific, calling system user (this is the Workflow's owner if its triggered automatically, or the caller of the manual execution).  This is, in effect, impersonation done by the Workflow.  So, if you've written a custom Workflow Activity that makes a web service call without inheriting this impersonation, you have defaulted back to the "SYSTEM" user.
    Dave Berry
    Tuesday, December 15, 2009 10:01 PM
    Moderator