Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I'm trying to debug the standard PurchReqApproval Workflow (WF) (AX2009).
As soon as I summited the Purchase Requisition to WF (and if WF batch has been setup correctly) the two classes (SysWorkflowMessageQueueManager and WorkflowWorkItemDueDateJob) start to process the WF "instances".
Anyhow, the WorkflowWorkItemDueDateJob class do processes a records of WorkflowWorkItemTable and I can't find a place in the code, where the record of WorkflowWorkItemTable is being inserted.I've overridden the WorkflowWorkItemTable.insert() and WorkflowWorkItemTable.update() methods, I put a breakpoints to those places where I think the WorkflowWorkItemTable buffer is being filled but with no luck.
So the question is - where (in the code) the record to WorkflowWorkItemTable is being inserted?
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
public static SysWorkflowWorkItemContext newWorkflowWorkItemContextFromWorkItem(
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));
I have tried to search WorkflowWorkItemTable in the following dlls:
Anyway the problem was not in the dll rather then in settings:
In general, the architecture of the Workflow for AX2009 is the following:
So, there are two components that should be checked: settings in AX and in IIS (for Business Connector)
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
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.
Business Applications communities