Thursday, August 15, 2019

How to debug Workflow in D365 without access to Batch.exe

Correct me if I am wrong, but there is no specific article https://docs.microsoft.com about debugging custom Workflow in D365.

So, once I bumped into necessity to test my custom Workflow classes, I found myself unlucky not having admin rights fot Batch.exe (as described here https://ax.docentric.com/debug-workflows-in-dynamics-365-for-finance-and-operations/)

Next search results (in particular this one https://thwidmer.wordpress.com/category/dynamics-ax-2012/page/2/) brought me to the following steps.

I stopped DynamicsAxBatch, which execute actual batch processing in D365.



I added the following simple class and and a menu item button to a form.



class CDPWFDebuggerActive
{
    static public void main(Args _args)
    {
        SysWorkflowMessageQueueManager::runStatic(conNull());
    }

}


Now I run it by the button to execute batch processing in step-by-step mode, and it perfectly hits my breakpoints inside of Workflow handlers once I attached to the standard IIS process.











No comments: