locked
InvalidWorkflowException - Type is not defined error RRS feed

  • Question

  • Hi,

    Could you please advise on the below error, its getting while hitting the workflow.

    Note: This error not occurring at all the time, getting this error twice or thrice from 100 hits.

    Exception information: 
        Exception type: InvalidWorkflowException 
        Exception message: The following errors were encountered while processing the workflow tree:
    'ABCActivity': The private implementation of activity 'ABCActivity' has the following validation error:   Compiler error(s) encountered processing expression "DirectCast(ContainerHelper.Container.Resolve(GetType(ISample)), ISample)".
    Type 'ISample' is not defined.

       at System.ServiceModel.Activities.WorkflowService.WalkActivityTree()
       at System.ServiceModel.Activities.WorkflowService.GetContractDescriptions()
       at System.ServiceModel.Activities.WorkflowServiceHost.CreateDescription(IDictionary`2& implementedContracts)
       at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
       at System.ServiceModel.Activities.WorkflowServiceHost.InitializeDescription(WorkflowService serviceDefinition, UriSchemeKeyedCollection baseAddresses)
       at System.ServiceModel.Activities.WorkflowServiceHost.InitializeFromConstructor(WorkflowService serviceDefinition, Uri[] baseAddresses)
       at System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory.CreateWorkflowServiceHost(WorkflowService service, Uri[] baseAddresses)
       at System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity)
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

    Tuesday, February 23, 2016 1:12 PM

All replies

  • Exception information: 
        Exception type: InvalidWorkflowException 
        Exception message: The following errors were encountered while processing the workflow tree:
    'ABCActivity': The private implementation of activity 'ABCActivity' has the following validation error:   Compiler error(s) encountered processing expression "DirectCast(ContainerHelper.Container.Resolve(GetType(ISample)), ISample)".
    Type 'ISample' is not defined.

    Hi,

    According to the error message above, this issue is related to 'ISample' definition,  could you check whether 'ISample' is defined properly? or you can provide more background about this issue, it will be helpful to troubleshoot.

    Regards,

    Angie



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 2, 2016 2:15 AM
  • Hi Angie,

    Thanks for looking on this!

    Yes, ISample is defined properly. This error not occurring at all the time. The same workflow is hitting multiple times per day and this error occurs once or twice in month. 

    And In IIS, we can see two endpoint bindings for the workflow service. one present at DEFAULT Web Site and another one for our application site.

    For ex:    /WorkflowServices/abc.xamlx    and       /AppABC/WorkflowServices/abc.xamlx

    Is it will cause any issue?

    Thanks & Regards

    Friday, March 4, 2016 8:26 AM