So, the record to the WorkflowWorkItemTable table (I think) do inserts by BusinessConnector.
This is the only pleace in Microsoft.Dynamics.Framework.Workflow.BusinessConnector dll where the WorkflowWorkItemTable can be found
namespace Microsoft.Dynamics.Framework.Workflow.BusinessConnector
[SuppressMessage("Microsoft.Design", "CA1054")]
[SuppressMessage("Microsoft.Design", "CA1011")]
[SuppressMessage("Microsoft.Design", "CA1062")]
[SuppressMessage("Microsoft.Naming", "CA1719")]
public static SysWorkflowWorkItemContext newWorkflowWorkItemContextFromWorkItem(
IAxaptaAdapter axaptaAdapter,
IAxaptaRecordAdapter _workflowWorkItemTable)
{
SysWorkflowWorkItemContext workflowWorkItemContext = (SysWorkflowWorkItemContext) null;
object obj = axaptaAdapter.CallStaticClassMethod(ProxyObjectBase.ProxyClassName.op_Explicit(SysWorkflowWorkItemContext.cClassName), nameof (newWorkflowWorkItemContextFromWorkItem), _workflowWorkItemTable.AxaptaRecord);
if (obj != null)
workflowWorkItemContext = new SysWorkflowWorkItemContext(axaptaAdapter, axaptaAdapter.CreateAxaptaObject(obj));
return workflowWorkItemContext;
}
I have tried to search WorkflowWorkItemTable in the following dlls:
Microsoft.Dynamics.Framework.Workflow.BusinessConnector.dll
Microsoft.Dynamics.Framework.Workflow.Communication.dll
Microsoft.Dynamics.Framework.Workflow.dll
Microsoft.Dynamics.Framework.Workflow.WebServices.dll
Anyway the problem was not in the dll rather then in settings:
In general, the architecture of the Workflow for AX2009 is the following:
- AX -> call some functionality (dll) which is executed on IIS
- In it’s turn the IIS call some functionality in AX thought the Business Connector
So, there are two components that should be checked: settings in AX and in IIS (for Business Connector)
- In AX, navigate to Administration/Setup/Workflow infrastructure configuration wizard
- Click Next button one time and you’ll be able to see the Workflow runtime URL (in my case it’s http://MyServerNameDEVAX01:80/WorkflowTest) – this is the location of you web site (on IIS) which executes some logic for the Workflow
- Next – you need to navigate to the Web.Config on your IIS.

3. As you can see from the picture above, the Web.Config has been modified by adding this line
<add key="BUSINESS_CONNECTOR_CONFIGURATION" value="C:\AX\AXC\dev.axc" />
So make sure, that the dev.axc file is really exists in the “C:\AX\AXC” folder.
Some tips, that may help you:
How to: Debug X++ Code in Workflow
docs.microsoft.com/.../dd638052(v=ax.50)
To debug X++ code in Microsoft Dynamics AX 2009 workflow, you must first set up the development environment. Because the workflow runtime executes X++ code by using the RunAsPermission Class and debugging is not supported in the RunAsPermission class user session, you must disable this feature for debugging. The following procedure describes how to enable debugging in the workflow runtime development environment.
By default, debugging is not enabled in Microsoft Dynamics AX. To enable debugging on the Application Object Server (AOS) and the client, see How to: Enable the Debugger.
To configure Workflow for debugging
In the Application Object Tree (AOT), expand the Macros node, right-click Workflow, and then click Edit. The X++ Code Editor window opens.
In the Code Editor, scroll to the bottom and change the value found in the following line from #define.WorkflowRunAsDebug(false) to #define.WorkflowRunAsDebug(true). This disables the RunAsPermission class feature and the X++ code executes directly on the workflow system account instead of on the user session. You may be required to change the workflow system account to a user who has Administrator user rights.
Press CTRL+S to save the changes, and then close the Code Editor window.
In the AOT, expand the Classes node, right-click the SysWorkflowHelper Class, and then click Edit.
In the Code Editor, click the Compile icon, and then close the Code Editor window. The debugger is now enabled for workflow.
After debugging, make sure that you reset the value in the Workflow macro to false and recompile the SysWorkflowHelper class to restore system security for workflow.