Stopped (error): Failed to find workflow instance. Failed to find workflow instance.

4 05 2012

We recently recently came across an issue at a client site where workflows instances would be completed but the status would be “Stopped (error)” with error messages saying “Failed to find workflow instance. Failed to find workflow instance. Failed to find workflow instance. Failed to find workflow instance” after investigating the issue for quite a while and not finding a solution I eventually found a post at “Peng’s Dynamics AX” Blog where he listed a hotfix that Microsoft released to resolve this bug. The knowledge base article for KB2398999 and download link can be found at:

Thanks to Peng for reporting this issue to Microsoft and following up with them for a year! You can view the original blog post here.


Resource Page for Known issues in AX2009 Workflow

3 05 2012

Recently came across this blog page with a list of workflow resources including hotfixes videos etc…

X++ Exception: Workitem could not be created.

2 05 2012

I have been doing some tests with a new custom workflow and came across the following scenario. (Note: this describes a solution to one of the many issues that may cause this error message)

I developed a custom workflow and its setup its corresponding configuration, I was able to submit and everything but ended up getting the following error in my workflow history when the workflow system tried to assign a workitem to me:

Stopped (error): X++ Exception: Work item could not be created. 
Insufficient rights for user Jonathan.
 at SysWorkflowWorkItem-create 
SysWorkflow-save SysWorkflowQueue-resume 

After exploring for a while I found an additional line on my batch server’s event log stating “X++ Exception: The workflow system could not access the business document data. Report this issue to your system administrator.” which once can trace back to line 68 of the SysWorkflowDocument.assertAsUser method.

I reviewed the query linked to my workflow document of my custom template and realized that one of the links or ranges caused no records to be returned, ever. Fixing the query and resuming my workflow caused the workitem to process correctly.

Unfortunately this error message was a bit cryptic for the actual issue at hand, but I hope this will help someone who runs into the same issue in the future.

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

Error executing code: FormDataSourceObject not initialised

25 11 2011

Your workflow quick fix for the day:

Ok, so you’ve developed your workflow template, enabled your form for workflow, setup a configuration and are ready to give your workflow its first test run. You open your form and the first thing you get is the debugger with an error message: “Error executing code: FormDataSourceObject not initialized” Called from the SysWorkflowFormControls\initControls class.

Error executing code: FormDataSourceObject not initialized

Don’t worry, this is a very quick fix, and you, like I did, may kick yourself for forgetting. Open up your workflow enabled form in the AOT, navigate to Designs, Design, right click, select properties and select a valid data source. e.g.

No data source selected

Data source selected


Installing Pre-requisite software for Workflow error

5 10 2011

I’ve just been installing Workflow on a client site running Windows Server 2008 R2 and came across a strange error.

When selecting the workflow component to install, it requested to install prerequisite software “IIS” and “.NET 2.0” However when clicking yes, it failed to install IIS and wouldnt allow me to continue. I managed to resolve the error with fixes.

  1. Ensured that no other Server Role Manager sessions were running/installing roles. (I was receiving the following error message in the IisInstall log file: Error (Id=0) Roles or features are currently being added or removed on this computer. Only one user can add or remove roles or features at a time to prevent conflicting configurations.” )
  2. I was also received the message “Error (Id=0) ArgumentNotValid: Feature not valid: ‘NET-XPS-Viewer’. The name of the feature was not found.” which we managed to resolve by modifying the line <Feature Id=”NET-XPS-Viewer” /> to <Feature Id=”XPS-Viewer” /> in the ServerManagerCmdInputIIS.XML file in the support folder of you AX2009 setup folder.

I hope this helps somebody struggling with this issue.
Happy Daxing


No .NET Business connector session found.

2 11 2010

My quick fix for the day. If you are getting an error message “No .NET Business connector session found.”  in your system event log, there may be a number of things to look at, however the first thing to check is whether the default business connector on your IIS machine is set up and pointing to the correct AOS. This may occur on development servers with multiple AOS instances. You can take a look at this post how to setup multiple workflow websites on the same machine in order to avoid this issue.

Happy Daxing

%d bloggers like this: