Workflow threw an exception for the following reason: Class MyDocumentClass cannot be instantiated.

2 05 2012

I’ve been battling trying to get one of my new AX2012 workflows to function properly. Whenever one tries to create a configuration against the template the info dialog says “An unexpected error has occurred while opening the workflow. See the event log on the AOS and contact your system administrator to resolve the issue.” Reviewing the event log gives the error “Workflow threw an exception for the following reason: Class MyWorkflowTypeDocument cannot be instantiated.

Resolving the issue required me to make use of the “Generate Full CIL” function in the AX developer workspace. Located on the toolbar to the right of the AOT button. Initially this didn’t help as some other classes or tables (still in development) didn’t compile (even unrelated to workflow). After removing these offending classes and tables and regenerating the CIL I was able to create a new workflow configuration


Actions

Information

Leave a comment