
I am currently employed as a senior AX developer for a South African company specialising in Microsoft Dynamics AX called Axnosis. Axnosis is Microsoft Gold certified partner operating from, Pretoria South Africa. We provide various addons for AX including (amongst others) modules and customisations for Mining, South African Localisations, HR/Payroll and Workflow.
I qualified in Computer Science with a Batchelour of Information Technology (BIT) degree from the Univeristy of Pretoria in 2005 and enjoy the development side of Dynamics AX and workflow in particular due to the direct impact that it has on clients productivity and making their business processes more effective. I love the Dynamics AX 2009 and AX2012 Workflow environments as they ares very flexible and almost anything can be done with a little bit of thought.
Certifications:
- Microsoft Dynamics AX 2009 MorphX Solution development
- Microsoft Dynamics AX 2012 Introduction to development
- Microsoft Dynamics AX 2012 Installation and Configuration
Contact Me:
Email: jonathan@axnosis.com
Company: http://www.axnosis.com
Phone: +27128413721





Hi jonathan,
Greetings.
Can you pleas help me on issue i am facing on the client side
The workflow url is valid in the admin module,still the work items are not created.
when i go to the log of the error notification i got
An error occurred while processing batch job Workflow Message processing.
Then i went to the log and found teh error
Error executing code: TreeNode object not initialized.
(S)\Classes\TreeNode\AOTiterator
(S)\Classes\SysDictWorkflowElement\getOutcomes – line 10
(S)\Classes\SysDictWorkflowElement\getCompletingOutcome – line 7
(S)\Classes\SysWorkflowEventDispatcher\onWorkItemEscalation – line 98
(S)\Classes\WorkflowWorkItem\escalateWorkItem – line 22
(S)\Classes\WorkflowWorkItemDueDateJob\run – line 15
(S)\Classes\BatchRun\runJobStatic – line 62.
Both the batches wf due date and WF messaging are having the same issue.
Can you help me on this.
Thanks for your time.
Regards.
(S)\Classes\TreeNode\AOTiterator
(S)\Classes\SysDictWorkflowElement\getOutcomes – line 10
(S)\Classes\SysDictWorkflowElement\getCompletingOutcome – line 7
(S)\Classes\SysWorkflowEventDispatcher\onWorkItemEscalation – line 98
(S)\Classes\WorkflowWorkItem\escalateWorkItem – line 22
(S)\Classes\WorkflowWorkItemDueDateJob\run – line 15
(S)\Classes\BatchRun\runJobStatic – line 62
Hi. This normally happens when something has changed to your workflow template. Try re-creating your configuration that you are using.
Hello, is there anyway to develop line item approvals for purchase reqs in 2009?
Hi Eric, you can definitely write Purchase Req line item approvals, but it may require some development on the Purchase Requisition form to get everything to continue to function correctly.
Hi Jonathan,
Myself Sreejith, an AX developemer from India. You are doing a wonderful job with your blogs. It helped me to solve a lot of issues very quickly.
Here, I am sharing one issue, which related with sub-workflows. I am very glad, if you can help me with your thoughts/experience.
I could not able to find the sub-workflow details in workflow history. Main workflow status shows as “Completed” and its kick started the sub workflows as well. Subworkflow’s Instance ID also displaying in Main workflow’s workflow history. But could not able to find about the sub-workflow details like to whom its assign to, the current status of sub workflow and workflow histoy details.
How can I get these details of a subworkflow. All informations are available In the “WorkflowStautsTrackingTable” for the subworkflows.
Note: Main workflow and sub workflows pointing into the same document class/table. For e.g. ProjectTable.
Thanks in advance
Sreejith Nair
Hey Jonathan,
Hope you are doing good. Myself Sreejith, an AX developemer from India. I need a clarification, regarding “work item owner”. I am not able to find out a proper defenition for it. Can you please help me with it.
As per AX 2009 workflow; If I am assigning a record to you, then who is the work item owner? (Role based workflow)
Thanks in advance.
The workitem owner is the person to whom the record is assigned.
Jonathan, Thank you for your reply. Here, I am sharing my findings.
Workflow using “resolveParticipant” method in the class “SysWorkflowEventDispatcher” to identify Work item Owners. For the same following code snippet is getting executed
case WorkflowActorType::Participants:
// we should rename this – it means work item users
// add all users associated with the element id to the user list
while select workItemTable
where workItemTable.ElementId == _elementId
{
users.add(workItemTable.UserId);
}
break;
This query executed on the “WorkflowWorkItemTable” table and select all records with the same element id as the current record element id. There can be other workflow records with same element id in “WorkflowWorkItemTable”.
So this will end up in identifying in-correct person as workitem owner.
Share your thoughts please.
Cheers,
Sreejith Nair
Hi,
My workflow gets activated but it is not assigned to the user i assigned..
please help
Hi Emine.
Please check the following:
1. Your workflow history (Basic -> Enquires -> Workflow history) to see if there are any basic errors being reported against your workflow.
2. You batch server event log for any errors that may be occurring
3. If your workflow is assigned but to the wrong person, check your delegation settings to see if the person hasn’t been marked as on leave.
Kind Regards
Jonathan
Hello Jonathan,
I am working on AX 2012. I have issues with Workflows.I have an issue with Workflows in AX 2012. Below are the steps I used for Workflows:
Step 1) Created a new Workflow Categories for Sales order module.
Step 2) Created a new Query (drag the Sales Table and changed the property to dynamic)
Step 3) Go to Workflow type ->addins->and a new workflow type is generated which consists of classes, workflow, menuitems and workflow types.
step 4) Now I create a new base enum and add four elements (Submitt, approve, reject, not submit)
step 5) I add a new enum on Sales table and change the enum type to enum we created in the previous step.
step 6) Now I add a form to my project Ex:: SalesTableFormList page and change the following on the design node:
Workflow enabled: Yes
Workflow datasouce: SalesTable
Workflow Type: SalesCreditLimitAppr1WFType (The new workflow type that was generated when we run the workflow type wizard)
Note that here Iam getting the following error ” Query does not contain 1 data source(s)”
Need help on this, please
Regards,
Amith
Hi jonathan,
After an employe enter his timessheet and submit it to workflow, I want to assign it to his manager for approval by x++ . Can you please help me.
thanks
Kind Regards
Abdelghani
hi there can you please guide me as to which class the workflow assignee is assigned to. I am trying to create assignment on dimension based, but i am not able to figure out the exact location where the assignee is resolved and assigned to.
the classes i came accross which has a userId(workFlowUser) assigned are
1. SysWorkflowEventDispatcher
2. SysWorkflowWorkItemContext
am unable to find out the exact code which needs to be modified so that i can assign it to my user as per my conditions.
any help would be greatly appreciated.
thanks a lot.
Hey Jonathan
Can you help me one strange error which I am getting while submitting a purchase requisition to workflow. I am having “Exception thrown in SysWorkflowEventDispatcher-onAcknowledgeElement SysWorkflowEventDispatcher-raiseElementAcknowledgementEvent : Web service failed: workflow id WFI000055 ClrObject static method invocation “. The error is not so frequent as it comes only sometime, I have re-installed workflow component but still same.
Hi Surender. You may want to check your event handlers that they are not issuing any errors. You can also check that you dont have any AX environments pointing to incorrect workflow websites. E.G. Test environment referencing a live workflow website.
Do you have any idea of class which I may need to check specifically ? Also I have noticed my workflow works absolutely find if does not have any condition defined at approval steps however it throws the error in my previous post when I run a workflow with a purchase requisition configuration having some condition defined at approval steps. I have defined 10 approval steps which condition e.g. if PurchReqTable.ApprovalAmount >= 1 and PurchReqTable.ApprovalAmount <= 1000 then execute approval step 1 and so on.
Hi Jonathan,
Can you please help me on Custom Fields in Workflows. From your previous blog you said to create a new method ie addCustomMergeValues() with the code provided.
Is this under EventNotification Class ? or EventNotification ?
Do i also add this.addMergeValue(‘assignedToName’, inbox.UserId); in the AddBaseMergeValues method ?
Hi Tay, if can you send me your email address and I will send through some sample code. My address is available on the about me page.
hi Jonathan, i have a problem with workflow in DAX 2009, the yellow bar is still not displaying, i can´t understand why, i did all you said but its not working, the workflow batch jobs are running, im trying to create a workflow for purchase requisition but when i create an orden and i save the changes nothing happen, could you help me? what may be missing? whats the problem? thanks a lot.
hi andrew,
go to table design properties check whether worflowenabled=true,workflowdatasource=ur table name
Sir,
when i am using workflow i am getting this error ClrObject static method invocation error may i know the reason why this error comeing
Hi Aslam. Normally your EventViewer in windows will give you a bit more information. Check both the standard list of events as well as the Workflow section (on the iis machine hosting your workflow website)
hi sir ,
My problem is that when i am runing workflow in the alert form this type of message getting The web service failed unexpectedly. Please refer to the Event Log “Microsoft Dynamics AX Workflow” for details. and also one error infolog also comeing with this error
SysWorkflowMessageQueueManager-run
SysWorkflowEventDispatcher-onAcknowledgeWorkflowActivation
SysWorkflowEventDispatcher-raiseWorkflowActivationEvent
ClrObject static method invocation error.
Exception has been thrown by the target of an invocation.
i am using server instance when i am checking in the event vier
control panel->system admin security->adminstrative tools-IIs manager-> in that i am not getting any workflow instance and also when i am checking in the eventviewer ->Application logs–>in the source->Side by side error ->in that Activation context generation failed for “C:\Program Files\Microsoft Visual Studio
10.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe”. Dependent Assembly Microsoft.
Windows.Common-Controls,language=”*”,processorArchitecture=”amd64″,publicKeyToken=”6595b64144ccf1df”,
type=”win32″,version=”6.0.0.0″ could not be found. Please use sxstrace.exe for detailed diagnosis. it is showing sir
please help me i really thank full to you .
sir ,
tell me one thing in the adminstration module in the setup WorkflowSetupWizard form is there when i am runing that wizard in that Url option is there when installed workflow at that time only Url given in the server instance but when i am clicking the validate Button it is given some error like Unable to connect to the remote server why it is giveing like that infolog.
please help me i really thank full to you sir,
Hi Aslam, it is most likely that your address that you entered for the workflow website is incorrect, please check that you have got the servername specified correctly and that it is not using name like localhost (if IIS is not running on the same box as your AOS/Batch AOS). You can also check out this post for more details: http://workflowax.wordpress.com/2010/01/12/workflow-walkthrough-infrastructure/
Hi Jonathan,
can we add a new line in a timesheet with status returned? I am able to insert à new line, but when i submit, it generate an error(you can’t submit to workflow). do you have idea about this behavior ?.
Best regards
thanks for this blog , it’s very helpful
Hi Amir, unfortunately I haven’t really worked with the Timesheet workflow extensively. You should be able to do a bit of reverse engineering by looking at the TrvWorkflowActions class. Kind Regards Jonathan
Hi Jonathan,
Please can you assist with an issue I am having with the Workflow Due Date Expiration Job.
Get the following message:
SysWorkflowEventDispatcher-onWorkItemEscalation
Failed to Find workflow instance
Workflow work item escalation failed.
The other 2 work flow batch jobs run fine…i.e Class:SysEmailDistributor and SysWorkflowMessageQueueManager however WorkflowWorkItemDueDateJob gives the above error.
Regards
Odette
Hi Jonathan,
I have an issue on workflow-ep-development. I ‘ve implemented the workflow-Action-bar in EP AX2009. The dialog for delegating a purchase requisition is not working correctly. The EmplTable lookup appears in the left corner of browser and doesn’t deliver the selected value.
any hint would be great.
Thanks dan!
Hi Jonathan,
Excellent blog. I always come here first when I’m looking for something on workflow.
I have a question around hierarchies in aX 2012. I have a situation where I don’t want the requester to be the person who approves the purchase requisition. It’s related to a segregation of roles. For instance, the requester could be a purchasing manager who wants a new computer for his department. In essence, AX should assign the PR doc to the purchasing manager for first approval, but also get that person’s immediate manager to approve the requisition. I am not sure how AX handles this.
Another issue I have is around PO workflows. In essence, I’d like the last approver to be the person who approves a price change request. So, if a PO is changed by say 10%, then the last approver needs to see the price change and then re-approve. However, AX doesn’t seem to have the option for last approver. I’m not sure if this requires a modification to the provider class.
Thanks very much for your feedback.
Cheers,
Dee
Hi Dee. In response to your first question: I’m not really sure what the best practise solution would be, I would imagine it would center around using Heirarchy Providers, you could either make use of the standard one provided if you are using the AX HR structures or create a custom Heirarchy provider if you have created your own structures.
I tend in scenarios like this to just write a custom ParticipantProvider class that analyses the record and returns the exact users that i would like it to, e.g. The purchasing manager and Immediate manager. One could either return them together if it is a single approval step or have two different tokens that the user could choose in config. E.G. ‘Purchasing Manager’ and ‘Immediate Manager’.
In regards to your second question: You can certainly specify a ‘Final approver’ by selecting the approval (not the individual step) node from your graphical configuration editor, right click properties, select ‘Advanced’ Select use final approver and then select a user. However I’m not aware of any way of adding a condition to a final approver (in the way AX defines it. If you wanted to accomplish a ‘Final approver with a condition’ you could simply add an additional step to your approval, this step you can Run condition to.
I hope this helps a little.
Hello Jonathan..
I hope you are doing well.. great stuff on your site and congratulations on becoming a workflow guru. Quick questions.. AX2012 workflows are present in different areas of the AX2012 application.. is there anyway to add a workflow to areas in AX2012 that do not have workflows? Example Inventory Management/Production Control.. I am in the need of creating a wflow process to this areas and I was thinking in adding all componenents on the AOT but before going this path I wanted to do some sanity check….
Hi. I’m glad that you enjoy this site and my comments and thoughts about workflow. Workflow can be added to any functional area of AX2009/2012. In order to get the menu item available in a module where it doesn’t currently exists you can do the following:
1. Duplicate a display menu item such as WorkflowConfigurationPurch
2. Rename the menu item to WorkflowConfigurationInvent
3. Change the menu item label to “Inventory Workflows”
4. Select ‘Inventory’ from the enumparameter property on the menuitem
5. Save the menu item.
6. Drag the newly created Menu Item to your Menus->InventoryAndWarehouseManagement->Setup node in the AOT. Save the menu.
All the new workflow types that you create should then be linked to a new workflow Category that you create in the following way.
1. Right click on the workflow Categories node in the workflow section of the AOT
2. Select New workflow category, name the new category ‘InventCategory’
3. Provide a label and helptext
4. Select Inventory from the module option.
I hope that helps a little bit
Kind Regards
Jonathan