Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
I am having a strange issue with my purchase requisition workflow. I continuously get the following error in event viewer under the "Microsoft Dynamics AX Workflow" group.
Exception thrown in SysWorkflowEventDispatcher-onAcknowledgeElement SysWorkflowEventDispatcher-raiseElementAcknowledgementEvent : Web service failed: workflow id WFIXXXX ClrObject static method invocation error.
I looked lot on net to find out the exact reason and resolution but didn't get much. I have already re-installed my workflow component and compile the whole AOT code but this also didn't fix this issue.
Strange thing is this, error occurs only when I have defined some condition in my approval steps, if I submit a purchase requisition with no conditions defined for approval steps then workflow works fine and complete without any error logged in event viewer, however when I defined any condition e.g. PurcahseReqTable.ApprovalAmount >= 2000 then I am facing the above mentioned error in event viewer and my workflow kept in pending status.
So bit confused is there anything wrong with my purchase requisition workflow configuration with condition or a bug in dynamics ax .
My environment configuration is
Microsoft Dynamics AX 2009 + Sp 1+ Roll UP 3, also i have installed the all individual hot fixes released for workflows in roll up 4, 5, 6, 7 but still didn't work.
My workflow batch interval is 3 min. I already tried it with 2 and 5 min but still error.
So I will be great if anyone can help me to fix this error.
Thanks & Regards
Can you give details about your workflow batch? ClrObject static method invocation error usually means that AX can't reach some specified file path associated with a process. In your situation I believe it might be erroring during your workflow batch.
Where are you defining approval amount field?
you are right this error occurs during the workflow batch execution which is setup with 3 min batch interval.
I have created 10 steps under the approval task and each steps has some condition to execute which is basically checking the PurchaseRequisition.ApprovalAmount value.
e..g If PurchaseRequisition.ApprovalAmount >= 0.1 and PurchaseRequisition.ApprovalAmount <= 1000 then go to step 1 and similar conditions for other approval steps having different approval amount range.
Without seeing your system, I'm not sure how else to help. Setting a range should not be affecting workflow approvals or prompting errors.
I can only suggest you debug your workflow to find out where in the code you are getting this error. You should be able to step thru the code and get a good indication of why this error is being thrown, or at least where along the process the error is thrown.
I can understand it's really hard to get an idea of issue without having access on the system :D. I have already tried to debug the workflow code running through batch user account but when it was calling the the dot net assembly of Workflow runtime in the method "raiseElemecknowledgementEvent " of SysWorkflowEventDispatcher class and it throws the above error. But it worked fine when it calls it first time to send the acknowledge for task complete but when it is trying to acknowledge the approval step it throws me this error at lest once.
Something to try is to adjust your Workflow Message Processing batch job recurrence.
We had these exact same errors. After a day of seeing workflow failure messages being delivered to my inbox and after several times of watching the "Workflow Message Processing" batch job end and not seeing invoices or POs move immediately to the next stage in an approval process, I deduced that some other things must still be running even though the batch job ended. What those other things are is beyond me. On this premise, I checked the batch job to see it was set to run once every minute. We set it to run once every 10 minutes and the problem went away immediately. Since this happened today, we are still watching closely for any other hiccups.
I have additional information making my previous post irrelevant.
Here is a sql statement that will help you find a problem workflow.
select wft.rootcorrelationid, wfst.INSTANCENUMBER, wfst.TRACKINGSTATUS, count(*)
from WorkflowTrackingTable wft
join workflowtrackingstatustable wfst on wft.ROOTCORRELATIONID = wfst.ROOTCORRELATIONID
group by wft.ROOTCORRELATIONID, wfst.INSTANCENUMBER, wfst.TRACKINGSTATUS
order by COUNT(*) desc
The workflow status of 0 is what you should look for.
A high number of entries in the WorkflowTrackingTable causes time outs and slows workflows down.
KB973439 is a recommended fix but.... when I looked through the code changes in the XPO, we already have those code changes installed in versions 5.0.1500.2116 (2009 SP1 Hotfix Rollup 4 (RU4)) and 5.0.1500.3761 (2009 SP1 Hotfix Rollup 6 (RU6))
This is what I did. I wrote a job to purge the excessive repeated records for the workflow that is causing the problems/slowdowns. I tried to leave relevant tracking information so a user could make informed decisions on that particular workflow. I canceled the workflow and submitted it to a workflow with literally no decisions. Users were informed that they needed to handle these differently. I have had no reports of the simple workflow failing like the complex one did.
If I have any more input, i will offer it up as best I can.
Business Applications communities