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 SysWorkflowWorkItem-createWorkItems SysWorkflow-save SysWorkflowQueue-resume SysWorkflowMessageQueueManager-executeTask SysWorkflowMessageQ
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 Wishlist #3
4 10 2010The item sitting at number 3 of my workflow wishlist is to have the canSubmitToWorkflow logic, that currently resides as a method on your workflow enabled forms, sit within workflow configurations or within a class linked to your workflow template. It seems strange to me that almost all the logic and complexity of the workflow sits in nicely packaged/distinct bundles i.e. templates and configurations, except for this one method. I would ideally like to be able to install a new template at a client site and without modifying the form, already have my canSubmit logic active.
Workflow does provide activation conditions per configuration, but my success using these has been fairly limited.
My workaround:
I have the habit of creating a static canSubmit method on all my WorkflowActionManager classes (i.e. per template) which I call from the canSubmitToWorkflow method on the form, this way it keeps the code fairly separate. The drawback is still that i cannot have different logic being performed if I have multiple configurations setup.
Please post any comments as to whether you have experienced similar issues or if you agree/disagree with me in this wish.
Happy daxing.
Share this:
Like this:
Comments : Leave a Comment »
Tags: canSubmitToWorkflow
Categories : Comments and Suggestions, Customisation, Dynamics AX 2009, Idea's to remember, Wishlist, Workflow