Questions?

Got any questions? Post them here and I’ll try and point you in the right direction.

Click here to view page 2 of Questions

273 responses

26 07 2012
Jonathan

From ROYK:

have you any experience with development of dynamic role assignments ?
example:if sales person x has initiated the process then resolve his manager from a custom field in the employee table or from an HR hierarchy and then assign the approval to that manager, or similarly assign the approval based on a field in inventtable according to a specific item selected ?

thanks !

26 07 2012
Jonathan

Hi Royk.

We’ve done custom Participant Providers and Hierarchy providers a couple of time for various clients. They are fairly easy to customize to do what you want to do above. Basically what you would need to do is the following
1. Create a Custom Participant Provider class.
2. Return a set of unique tokens E.G. ‘Resolve from item’, ‘Creator’s manager’ etc…
3. Resolve these tokens if selected in the ‘resolve’ method.
4. Link your approval to this new participant provider.
5. Select the relevant resolution method in your workflow configuration.

Sample getParticpantToken Method (Just pseudo code):
public WorkflowParticipantTokenList getParticipantTokens()
{
UserGroupInfo userGroupInfo;
WorkflowParticipantTokenList token = WorkflowParticipantTokenList::construct();
;

token.add(“FROMITEM”, “Resolve from item”);
token.add(“FROMEMPLOYEE”, “Manager”);

return token;
}

Sample resolve method:
public WorkflowUserList resolve(WorkflowContext _context,
WorkflowParticipantToken _participantTokenName)
{
UserGroupInfo userGroupInfo;
UserGroupList userGroupList;
UserInfo userInfo;
WorkflowUserList userList = WorkflowUserList::construct();
WorkflowWorkItemTable workflowWorkItemTable;
WorkflowTrackingTable workflowTrackingTable;
SysWorkflowTable workflowTable;
MyDocumentTable mydoc; //record type that your workflow is using
;

mydoc = MyDocumentTable::findRecId(_context.parmRecId());

if (_participantTokenName == “FROMITEM”)
{
userList.add(InventTable::find(myDoc.ItemId).CustomUserField);
}
else if (_participantTokenName == “FROMEMPLOYEE”)
{
userList.add(EmplTable::find(myDoc.EmplId).CustomManagerField);
}
return userList;
}

I hope this helps in some ways.
Regards
Jonathan

2 08 2012
Mindaugas

Hello Jonathan,

do you also have workflow approval/rejection via email functionality for AX2012? If not, is it in your plans? I was hoping that it would be a part of standard AX functionality, but couldn’t find anything,

Thank you.
Mindaugas

3 09 2012
Surasol

We need approve by email functionality for AX 2012. Is that a standard for 2012?

4 09 2012
Jonathan

Hi Surasol.

This is not default functionality in AX2012, however my company does supply an add-on module to accomplish this task. Please contact me via email (jonathan@axnosis.com) if you would like further information regarding this product.

Regards Jonathan

27 09 2012
Ric Glowienka

Hi Jonathan:

Do email-based workflow approvers need to be licensed AX users in AX 2012? If so, what level of user license do they need to have?

Thanks,

Ric

28 09 2012
Jonathan

Hi Ric.

I believe AX will only allow you assign workflow items to licensed users. The type of user CAL required will be dependent on the specific functionality / workflow that you are using. The workflow approver doesn’t apply any specific restrictions.

Kind Regards Jonathan

3 10 2012
Per Jakobsen

HI We have a custom workflow, and when using this workflow we get the following error message “Structure of lookup table doesn’t match with the query table structure.”

the workflow does what it is supposed to do tho.

any hints ?

3 10 2012
Jonathan

At what point in the workflow do you get this error?

You can try refreshing/recreating the Query that is attached to your workflow document class.

3 10 2012
Per Jakobsen

We get the error, at the final stage of creating a purchase request for a quotation (RFQ), just before the final action.

3 10 2012
Per Jakobsen

Does the query need to match the tables in the form where the workflow is used ??

5 10 2012
Jonathan

No it just needs to be the same table as the table that you have selected as the “WorkflowDatasource” on your form.

18 10 2012
Kyle

Do you have any experience writing Automated Tasks for AX2012? As far as I can tell they execute once and finish. Is there any way (possibly through other means) to have it recursively call my function until I mark it as complete? (When I say recursively call, i mean every time the batch workflow process runs)

19 10 2012
James

Hey Jonathan,
I am getting an error when trying to use subworkflows from a functional perspective. Once I choose the subworkflow within the workflow element, the drop downs . The dropdown “Field” is empty in the document key. This is in the Contoso sample data. The error reads “Subworkflow Document key: The document key selected for sub-workflow element is not valid.” I beleive this is an issue of development. Do you have any suggestions or insight into the matter?

25 10 2012
Jonathan

Is the subworkflow that you are trying to link to making use of the same workflow document?

25 10 2012
James

Yes, they are all PO workflows with the type PurchTable Template. I assume the document key field should be populated with “Purchase order” or something to that degree, but is instead a blank dropdown. I can invoke an active purchase order workflow into the subworkflow element but the document key is still blank.
Thank you, and sorry for the typo in my original comment.

20 05 2013
colinmitchell

Please see my blog post on this topic:

Tutorial: Configuring Subworkflows in Microsoft Dynamics AX 2012
http://colinmitchell.net/dynamicsax/?p=188

Hope it helps,
Colin

22 10 2012
Anil

Hi Jonathan,
Can you please through some light on a business requirement I have on Purchase Requisition – Possible approvals for a Requisition are from six approves depending on the purchase value. As an example Director, General Manager, Senior Manager – Marketing, Marketing Manager, Supervisor etc need to approve if the purchase value is the highest amount. This hierarchy exists in multiple departments from Senior manager level, so the approval flow will differ till Senior Manager level, however GM and director will remain the same. Really appreciate if you can point me to the right direction.

22 10 2012
Per Jakobsen

Hi Jonathan
While running the workflow, im trying to get information, related to the current approver. but somehow when i use curuserid(); i get only the workflow system user.
how do i get information to as who now is approving the workflow, and who is submitting the workflow, via code. (AX2009)

Kind regards
Per

22 10 2012
Jonathan

HI Per

Where is your code residing? Is it in the Event Handlers? Can you paste some sample code for me?

12 12 2012
Per Jakobsen

Hi here is some sample code. my question is where to get the actual wf user/approver at this point in the WF.

public void completed(WorkflowElementEventArgs _workflowElementEventArgs)
{
SalesTable SalesTable;
;
select SalesTable where SalesTable.RecId == _workflowElementEventArgs.parmWorkflowContext().parmRecId();
// at this point i would like to pass the actual approver to the static
//method WFSalesTableSCM::approve ??
WFSalesTableSCM::approve(SalesTable);
}

12 12 2012
Jonathan

Hi Per

Unfortunately the completed event handler will not give you the person who approved the item. The event event handler is only called once all the steps and sub-steps of an approval are complete. As such there is no direct correlation to a single user as one or multiple people may have approved the record.

Depending on what you would like to accomplish, the easiest way to get an approver is to add some code to the class behind your ‘Approve’ menu-item. At this point you aren’t guaranteed that there aren’t more steps with other approvers but you can at least get the current approver.

Regards Jonathan

> > New comment on your post “Questions?” > Author : Per Jakobsen (IP: 41.191.99.78 , 41.191.99.78) > E-mail : perja@stlghana.com > URL : > Whois : http://whois.arin.net/rest/ip/41.191.99.78

12 12 2012
Per Jakobsen

would it be correct to lookup in the ‘WorkflowTrackingTable’ with correlationid and look for tracking type ‘approval’ copy the user, provided in the same table, there is a record of type ‘completed’ with user ‘wfsys’ (in my case)

13 12 2012
Per Jakobsen

Hi
Would it also be correct to find the approver, over writing the saveTracking method on WorkflowTrackingTable and find the approver, when executing the WF.

Per

13 12 2012
Jonathan

Hi Per.

Yes, you can do that. We have used that exact method also in order to create customized audit trail of who has done what.

On Thu, Dec 13, 2012 at 2:12 PM, Dynamics AX Workflow Wanderings

22 10 2012
umar

how to create a workflow in ax 2012
can u explain step by step from staring to upto end?

20 11 2012
Mesut BOZTAŞ

Hi,
My question is about parallel activity func. in ax 2012

1- Firstly If I define 2 branches in parallel activity, the workflow instance wait for completion of both 2 branch to continue next step in WF? How system behave to manage them?
2 – what is the real diff. between sub wf and parallel activity. Is there a good example for parallel activity?

22 11 2012
Jonathan

Hi Mesut.

Unfortunately I haven’t had much experience in using parallel/branched workflows especially in AX2012. I suspect if developing for these types of workflows you will need to carefully manage your document status’s so that they are not overwritten by each other.

I think a good example of parallel activities would be multiple tasks that might need to be performed on a record by various people at the same time. E.G. A new job opening may require one person to publish the opening on the web and somebody else to publish the job to internal employees.

I hope this helps a little bit.

Regards Jonathan

On Tue, Nov 20, 2012 at 5:19 PM, Dynamics AX Workflow Wanderings

27 11 2012
Mike

Hi Jonathan,

Is it possible to over-ride the approver on workflow 2012? I have a request to be have the users to only submit a payment journal to a particular approver, even if they belong to the same group. This is because they don’t want everyone that is in the same approval group/Security role to receive the same notification to approve a single journal.

For example, I have added on the Payment Journal Header form a new field called “Approver” which allows the user to select a user to select a particular Approver to submit the workflow to.

I was hoping to use this new field, which I have added to the LedgerJournalTable form, on my Vendor Disbursement Workflow. However, when I go through the assignments, I can’t seem to find a way to over-ride the pre-populated drop downs in the list.

Do you think it’s possible to do this?

28 11 2012
Jonathan

Hi Mike.

It is definitely possible to do this. You could either: 1. Use conditions in your configuration to execute different steps based on specific conditions and assign the relevant people to that step. 2. Write a custom participant provider for your workflow. The participant provider class can retrieve information out of the calling record and return specific users based on the record. E.G. If the a Purchase Order is a blanket order assign it to Joe, or if it is a normal order assign it to Peter.

Kind Regards

On Tue, Nov 27, 2012 at 8:03 PM, Dynamics AX Workflow Wanderings

28 11 2012
Jonathan

I’ve attached a configuration screenshot at the top of this page to illustrate what i mean in #1.

28 11 2012
Mike

The Participant Provider class was exactly what I needed! It’s funny, in AX 2012, they don’t use that property on the Workflow Approval in the AOT. I found the class however, and modified the class in order to add in another property just like in your Participant Provider example.

Thanks for the tips! You saved me hours of head scratching grief!

28 11 2012
Jonathan

Hi Mike.

AX2012 has made the Participant providers much more flexible by not forcing you to use a specific Provider for an approval. You can now choose from a pool of providers, some generic e.g. User Group provider and some specific to document types.

Regards Jonathan

On Wed, Nov 28, 2012 at 4:57 PM, Dynamics AX Workflow Wanderings

28 11 2012
Jonathan

Hi Mike. I’ve added an article that describes this in a bit more detail. http://wp.me/pDYd4-aJ

2 12 2012
Kyle

If i start a workflow, then half way through the workflow delete the record the workflow kicked off from, I get errors in workflow history. (As i would suspect) How can I delete all of the workflow instances inside my records .delete() method?

3 12 2012
Jonathan

Hi Kyle.

My recommendation would really be to force the user to cancel the workflow before he is able to delete it. That way the AX will clean up all the workflow instances first and leave an audit trail of what happened in your workflow history table. You can try delete the instance manually, but its much more risky. You will need to look at at least these tables: WorkflowTrackingTable, WorkflowTrackingStatusTable, WorkflowWorkItemTable, WorkflowTrackingArgumentTable, WorkflowTrackingCommentTable

Regards Jonathan

> > New comment on your post “Questions?” > Author : Kyle (IP: 64.31.80.61 , century-29.wcnet.org) > E-mail : kwascher@cmcgp.com > URL : > Whois : http://whois.arin.net/rest/ip/64.31.80.61

27 12 2012
stalker25

Hi, could you please help me to figure out if orders under workflow can be approved/cancelled for multiple records?

9 01 2013
Anil Kumar

Hey, can any one help me in creation of the workflow.

I am able to create a Workflow.And i am getting the yellow bar in the form.

When ever i submit the work flow,it is updating the records,

but after submitting the workflow i have to get the “view history” button on the yellow bar.I am not getting that.I can still see the submit button on the yellow bar.How to get the “View History” button on the Yellow bar??

Please help me in solving this issue.

10 01 2013
Jonathan

This is probably because your canSubmitToWorkflow method on the form is returning true even though the record is submitted to WF. Check your logic in that method to ensure that it returns false if the record is already in WF.

On Wed, Jan 9, 2013 at 5:57 PM, Dynamics AX Workflow Wanderings

22 01 2013
Haroon Attari

Hi Jonathan
I have created a custom table/form and have created a workflow for the same by following steps mentioned in Chapter 6 of Development III MOC for AX 2012.
Everything seems OK except one thing that workflow element is not showing ‘Approvals’ node. Infact, workflow element node is only showing ‘Flow controls’ only. Any idea what is missing?
BR// Haroon.

23 01 2013
Jonathan

Ensure that the approvals element that you created is linked to the same document type as your templates.

On Tue, Jan 22, 2013 at 11:26 PM, Dynamics AX Workflow Wanderings

23 01 2013
Lan

Hi Jonathan
When I run workflow infrastructure configuration wizard – I can’t select batch group which I created – the field is grey. When I inquiry the batch job – it all pointed to one company account which I do not use when creating my workflow (my environment is multi-companies, all batch are in dat). As a result – my jobbatch does not run at all because I start workflow in a company which is different than dat, it just show schedule start time. If I view the task in jobbatch list – it shows start time and end time for my workfow as the last batch ran by system admin for data update. Do you have any idea where should I check to fix this error.
Thank you very much

23 01 2013
Jonathan

Try delete the Batch jobs before running the infrastructure wizard

On Wed, Jan 23, 2013 at 4:05 PM, Dynamics AX Workflow Wanderings

23 01 2013
Lan

I can’t see any batch job in “my batch job” in any company even though I did submit expense reports in my workflow and its status change to “In review”. It shows that there is not any batch job has been generated. What can I check next? Thanks

23 01 2013
Lan

I figured it out now. My workflow works – Thanks

31 01 2013
Andre

Hi, i have a scenario where i have to assign a workitem to a specific user, and if this user do not respond inside the delay i need to escalate the workitem to a group of user. do you know what is the best way to proceed, since i cannot put a user group in escalation. can i do 2 step and, in the 2nd step, check the workitem status to see if the approval has occured in step 1 ? do i need custom code for a scenario like this ?
thanks you, great blog !

1 02 2013
Jonathan

Hi Andre.

Remember that escalation is taking place on an individual work item basis. Therefore a single work item assigned to a user cannot be spilt into multiple work items when escalated. Hence the lack of being able to escalate to a group. You could possibly follow your suggestion regarding multiple steps, I don’t see any reason why it shouldn’t work. You can also try writing a custom hierarchy provider to return individual users from a user group for use in escalation. The hierarchy providers do tend to be a bit tricky though.

Regards Jonathan

On 31 Jan 2013, at 10:46 PM, Dynamics AX Workflow Wanderings

4 02 2013
Andre

hi, thank you for the suggestion.. here’s how i achieved it. i came across this very interesting page on your blog https://workflowax.wordpress.com/tag/calculated-fields/. so i create a property on my document like

public lmb_IsStep1DueDateExceeded parmIsStep1DueDateExceeded(Companyid _companyid, tableId _tableId, RecId _recId)
{
WorkflowStepTable workflowStepTable;
WorkflowTrackingTable workflowTrackingTable;
;

select workflowTrackingTable join workflowStepTable
where workflowStepTable.StepId == workflowTrackingTable.StepId
&& workflowTrackingTable.ContextTableId == _tableId
&& workflowTrackingTable.ContextRecId == _recId
&& workflowTrackingTable.TrackingContext == WorkflowTrackingContext::WorkItem
&& workflowTrackingTable.TrackingType == WorkflowTrackingType::DueDateExceeded
&& workflowStepTable.Sequence == 1;

if (workflowtrackingtable)
{
return NoYes::Yes;
}

return NoYes::No;
}

and then in my wf configuration, in step 1, i set an automatic action to ‘Approve’. In step 2, i set a condition base on my custom parameter above to start this step only if due date has exceeded in step 1, + i set the automatic action to ‘Reject’ if time has exceed.

In step1, the action is assigned to 1 user and in step 2 the action is assigned to a group of user. This way i can bypass the lack to be able to escalate to a group if time has exceeded.

5 02 2013
Clark

Hi Jonathan!
I am a beginner at administering DAX and the company I work for wants me to implement Purchase Requisitions. I have it almost 100% working but one use case is not right: if the CEO submits a requisition then the approval workitem stops because he does not report to anyone.
I have given him an arbitrarily high approval limit but even if a requisition for some small amount is submitted it still does not work.

Am I missing some flag/config that says only create work item IF the submitter has lower approval value than requisition amount?

Thanks for any hints!
Clark

6 02 2013
Jonathan

I would agree with James, that you could create an auto-approval on your step to approve the record automatically if the submitter has a lower approval value than requisition amopunt. Another idea that you could try is to create an extra step that deals with the CEO case specifically and does a static assignment.

22 02 2013
Bhav

Hi Clark/Jonathan,

By any chance did you use Hierarchies in your workflows? I’m trying to use hierarchies in purchase requistions (DAX 2012). i’ve set up spending limits through the policies, set positions, jobs and assigned to users.

i’ve created a position hiearchy with a trainee (upto $1000 limit), Team Leader (upto $5000) and Manager(upto $10,000). The test im trying to run is that if i create a requistion of $6000 it should bypass the Team Leader and go straight to the manager. At the moment, its going to the middle person and then to the Manager. Any suggestions for configurations would be helpful. This is only a test, i’m trying to implement in a orgainsation with many more layers so would like to bypass the middle men and go to the right person who can authorise.

Thanks,

Bhav

5 02 2013
James

On the approval step for your CEO, configure a condition in the automatic conditions for running this workflow. The step should be if workflow originator is (choose the CEO from the dropdown) and set the automatic action to approve

6 02 2013
Clark

Thank you James and Jonathan!
I feel silly as I probably should have figured that out myself. I have not tried any automatic actions yet and I can see there is much yet to learn.

6 02 2013
James

No problem. The real condition you are trying to set is if the Requesters approval amount > Requisition Amount then auto approve. Using the workflow originator works though also.

8 02 2013
Aman Gupta

Hi,

I have created a customized workflow in Ax2012 . Everything is working fine till submission..

But after submitting record not able to see workflow bar…

Please help…

Aman Gupta

8 02 2013
Jonathan

What does the workflow history on that record say?

On 08 Feb 2013, at 1:15 PM, Dynamics AX Workflow Wanderings

9 02 2013
Aman

Hi Jonathan,
I am setting up a workflow on Vendor invoice lines and in configuration, i have a condition Vendor invoice lines.quantity matching successful. Its a True/False condition, but not working. Basically, if my product receipt qty doesnt match invoice qty, i trigger this workflow, The funny part is this “quantity matching successful” is not really a field on VendInvoiceInfoLine table (Vendor invoices lines), it is a Window control with a method attached checkIfQuantityMatch. I want to know if i can find how Workflow configuration gets this field on UI (Basic Settings form). And if i can check how it works in the backend. Like any logic i can check/change. Thanks.

15 02 2013
17 02 2013
Jan Noergaard

Hi Jonathan
I am dealing whit an approval scenario for purchase approval in AX2012R2. I am making use of Job and approval limit and have hired persons for the different positions. This would be like:

Purchaser approval limit 5.000 DKK
Purchase manager approval limit 15.000 DKK
Supply chain manager approval limit 150.000 DKK
CEO approval limit 1.000.000 DKK
This works fine, though I have still to test for purchase order above 1.000.000 DKK.
My real problems is if the purchase order is related to a project, then these approval limits are RAISED. Then eg. the purchaser may buy for 50.000 DKK or the like. Is it possible somehow to make a new field (on the position hierarchy) or a new type of position hierarchy with higher approval limits, and the sort of choose this in the ‘Managerial hierarchy’ on assigment tab in the standard workflow.
Maybee a customization of the workflow provider.
Thanks in advance, enjoying reading your answers.
BR/ Jan

18 02 2013
Per Jakobsen

A small challenge.
I have a situation where i have a approval workflow, that i would need to escalate based upon the following.

The approvers, need to be manager to the submitter.
the approver hav a PO limit which have to be meet in order to approve, else the approval goes to his ‘manager’ whom has the correct approval amount level.

Escalation would automatically go to next level approver IF again amount limit is not meet, or time limit is exceeded for approval.

Any ideas.
TIA
Per Jakobsen

18 02 2013
Jan

Hi Per
This I think you can achieve by use of positions in AX. See my above example where I have this setup – and it Works. If the limit is exceeded it goes to the Next in line.
Create postions, hire in the people and assign those the position, and assign which position the Refer to.
Then setup signing limit (Organization\Setup\Signing limiks).
Only challenge is before running this that all position have an employee attached and this should also be able to login for test.

BR
Jan

19 02 2013
Per Jakobsen

Could this code be added to the Workflowusergroup provider class. in order to retrieve users capable of approving a PO. and then still use the calendar escalation rules ??

if(tablenum(PurchTable) == _context.parmRecId() )
{
mydoc = MyDocumentTable::findRecId(_context.parmRecId());
purchtable _ptable = purchtable::findrecid(_context.parmRecId());

if (_ptable.canApprove(myDoc.EmplId))
{
userList.add(InventTable::find(myDoc.ItemId).CustomUserField);
}
}
else act normally//

return userList;
}

21 02 2013
Per Jakobsen

Hi Again :-)… Love this blog

Has anyone experience modifying the hierarchy provider to also include limit for Purchase order, and not just Purchase requisition.
Reason is that the company i work with do not want to utilize purchase requisitions, but they work directly with Purchase orders. and as i can se i can utilize the hierarchy but not the amount limits

Kind regards
Per

22 02 2013
Jonathan

AX2012 or AX2009?

On Thu, Feb 21, 2013 at 3:26 PM, Dynamics AX Workflow Wanderings

22 02 2013
Per Jakobsen

AX 2009.. :-).

27 02 2013
Remko

Hi Jonathan,

I have created an automatic task for the workflow and want to set some properties for this automatic task. I would like to make some changes in the UI of the workflow property settings. See this screenshot: http://s8.postimage.org/4d8z3rahx/Update_workflow_status_UI.png

Do you know if, and how this is possible?

Regards,

Remko

11 03 2013
Jonathan

Hi Remko

I haven’t tried something like this before. Technically I see no reason why you wouldn’t be able to accomplish this though although you would be customising a standard workflow component for use in a specific workflow type.

From your screenshot however it seems like you shouldn’t be needing automatic actions to set statuses but rather using the event handlers of you tasks and approvals to set the statuses as required.

My recommendation would be to steer clear of customising standard workflow components as it makes upgrades and hot fixes a bit trickier to install.

Regards Jonathan

On Wed, Feb 27, 2013 at 2:01 PM, Dynamics AX Workflow Wanderings

28 02 2013
Shawn Mohammed

Do you still answer questions here ?

11 03 2013
Jonathan

Hi Shawn.

I try to answer question as much as possible, when i do get the time. Sometimes it can take a while to actually get to them.

Regards Jonathan

> > New comment on your post “Questions?” > Author : Shawn Mohammed (IP: 190.213.197.126 , 190.213.197.126) > E-mail : coolfiger@gmail.com > URL : http://www.facebook.com/xerocool > Whois : http://whois.arin.net/rest/ip/190.213.197.126

4 03 2013
Per Jakobsen

Hi

I have created this custom resolve method with the following criteria

while(stopCondition == NoYes::No)
{ // add all enabled users to user list
select ghaConfirmTable where ghaConfirmTable.Active == NoYes::Yes && ghaConfirmTable.ConfirmUserId == nextlevel;

if((ghaConfirmTable.Amount >= PurchTotalAmount) && (ghaConfirmTable.Manager == NoYes::No))
{
userList.add(ghaConfirmTable.ConfirmUserId);
nextlevel = ghaConfirmTable.NextLevel;
}

if(ghaConfirmTable.Manager == NoYes::Yes)
{
userList.add(ghaConfirmTable.ConfirmUserId);
stopCondition = noYes::Yes;
}

}
return userList;

In my token i have called the list “company organisation”
my question is now.
how will this list behave.
It shows up as role based assignment. where I have selected a single user just needs to approve.

So Will all the users in this organization be added and get notification about the Approval ??
and how would escalation path do of good here ?

kind regards

Per

11 03 2013
Jonathanthan

Hi Per. Is this code from a class inheriting from Hierarchy provider or from Participant provider?

14 03 2013
Per Jakobsen

Participant provider..
Could I use the same code inherited from Hierachy provider ??

14 03 2013
Per Jakobsen

I cant seem to find the resolve method for the Hierarchy provider

8 03 2013
Per Jakobsen

NINE ONE ONE (911)
I have setup a hierchy wf configuration. i can submit (start from user).
I see the wf is submitted to my approval step. but i don see any users being assigned. as i do if i just setup with normal single user config for WF.

I dont get any error in the wf, when submitting.

Any suggestions.

8 03 2013
Jonathan

Are you sure that the heirarchy will resolve? You can also check your server’s event log for more info.

On Fri, Mar 8, 2013 at 4:06 PM, Dynamics AX Workflow Wanderings

12 03 2013
jzeng

I saw my old friend here. I have issue now. From workflow history – assign button, I can assign a work item to any user if this user is in hierachy user range, but that employee as assignee limit is less than PO requisition total amount. We have tested many times, and I configure workflow – assignment with ‘Don’t assign to users that meet fellowing condition’, it still go to wrong approver which employee limit is less than PO amount.

I checked sysworkflowEventDispatcher::onworkitemDelegate, there direclty put _toUserId as assignee without checking limit or hierachy…

So workflow sounds totally to be broken.
Any help on this??

14 03 2013
Jonathan

Hi Jzeng.

The workflow history form has no filters on the re-assign user selection drop-down as this is really an administration function. My recommendation is to try either of the following: 1. Customise the WorkflowWorkitemActionDialog form to filter the users when required. 2. Create a custom comments / delegate form and use this in the code behind your specific workflow approval’s Delegate menu-item. 3. In the code behind your specific workflow approval’s delegate menu-item perform validation on the user provided from the WorkfloWorkitemActionDialog.

Regards Jonathan

On Tue, Mar 12, 2013 at 7:46 PM, Dynamics AX Workflow Wanderings

3 04 2013
jzeng

Hi Jonathan, thank you so much for shed a light on this… my company has 20 companies account, and one used red maple before which can re-assign work item any time but AX 2009 is not designed that way. I would work back and focus on this once I have time. We are merging a company from JDE to AX now. Per, nice to you here. Drop me mail if you would like and keep touch, my dear friend.

13 03 2013
Per Jakobsen

Hey Jzeng..

Miiis u ;-)

Let me look into this

Jonathan sorry for this off topic

13 03 2013
Per Jakobsen

Hi Jonathan Looked at the event viewer.

here is what i get when using the hierarchy provider

Workflow instance: cc12de3b-85f2-4eeb-ad14-22408aad9365 was terminated for the following reason: Dynamics Adapter CallStaticClassMethod failed..

19 03 2013
Muhammad

Hi Jonathan,

Once the work flow is completed and approved, the treenode on workflow history does not show the approver name and in some cases , shows WFSYS instead of the approver.
I appreciate all your help in this matter.
thank
Muhammad

5 04 2013
Jonathan

Could you send me a screenshot via E-mail?

19 03 2013
Leeza

Hi Jonathan,

I have requirement to add a participant node to the escalation section. Is this possible. Ax 2012 has only heirarchy, workflow user, user and none is the Escalation section!!. Any help would greatly appreciated.
Thanks
Leeza

5 04 2013
Jonathan

Hi Leeza.

In my experience you are only able to use either Hierarchy or Static users for Escalation. We looked into this a bit in AX2009. If you really needed to accomplish something specific you could create a custom Hierarchy provider that returns very specific users (hacking it a bit).

Regards Jonathan

5 04 2013
Leeza

Thanks Jonathan. I tried that but i wasnt able to resolve the selection like in participanr provider.I saw an approach in one of these posts, but the workflow configuration requirement that we have has multi level review and approval !!! Do you still think it can be hacked?

10 04 2013
Jonathan

Hi Leeza. “Hacking” the hierarchy providers can be a bit tricky, but if you need to accomplish the functionality it can be done. Unfortunately I’m not aware of any standard way of accomplishing what you are looking for.

Regards Jonathan

20 03 2013
N

Hello Jonathan,

Thank you for the great postings. We have implement workflow for timesheets at the line level in AX 2009. Recently, we changed it to the document level approval. The process works fine within AX but the performance on the EP is greatly impacted. It is taking atleast 3 minutes for the approval timesheet to open. Any idea why?

Thanks in advance for your help
-N

3 04 2013
George Chernev

Hello Jonathan,
I am trying to set up a workflow for approving purchase requisitions. I’ve set up the PurchReqReview workflow and also the PurchReqLineReview. When user submits a requistion for approval, they can enter a comment. I’d like to display that comment to the approval (ideally in an email), using the %Workflow.Last note% element. The approver gets the e-mail but the comment is not displayed. I believe that’s because the comment is stored on the header-level workflow (PurchReqReview) and the approver gets the work item and notification from the line-level workflow (PurchReqLineReview). So the line-level workflow has no comments and the notification does not include the comment from the header-level workflow. Any ideas how to solve this?
Thanks,
George

5 04 2013
Jonathan

Hi George.

Have a look inside the mostRecentCommentMethod on the PurchReqTable. You can customise this to find the most recent comment linked to either the line or the header. This may not have the desired results that you are looking for though. You could also try and replicate this method within your PurchReqLineTable and then use it within your workflow instructions in config.

I hope this helps a bit. Kind Regards Jonathan

9 04 2013
Joel

Jonathan,

Have you done a customization where a specific workflow or the regular work items within a workflow do not send emails? The scenario is to not send emails for Timesheet approvals, but there’s no parameter for emails getting sent on regular work items.

Regards,

Joel

10 04 2013
Jonathan

Hi Joel.

I haven’t done this myself. But you could try and do a customisation within the EventNotificationWorkflow class. In the create method you can surround the line “this.sendMail()” with a specific condition.E.G. if (inbox.AlertTableId != tablenum(TSTimesheetTable) { this.sendMail(); }

16 04 2013
Joel

Just FYI – my client decided it would be easier to add some rules to their outbound email filter than to modify AX.

25 04 2013
riddletonm

Hi Jonathan,
Have you set up a workflow with case management? I am trying to link the activities created in case management to a workflow. Can you do this?
Thanks
Rosie

8 05 2013
May

Hi Jonathan,

I need your help. Would you help me with my problem? Why PR Workflow in AX 2012 always assign to workflow owner although the configuration already set by user based?

thanks a lot

May

8 05 2013
Jonathan

Please can you send me an export and screenshots of your workflow configurations.

Kind Regards

8 05 2013
Jeff

Hello,

Can you use AX 2012 workflow for 2 levels of approvals? 1st step would go to department head, 2nd step would go to Controller for approval, then post?

I am getting errors when I attempt to place 2 approval actions in the same string on a workflow.

Any help or pointers would be greatly appreciated!

Thanks,
Jeff

14 05 2013
Praveen Kumar

Hi Jonathan

I have done setup of Purchase requisition workflow and stuck on one issue. If requisition is related to any project then it should go to Project Manager also.
I tried: Created element with Assignment to Participant->Security Role->Project Manager as participant. And assigned Project Manager rights for workflow approval and Project manager role assigned to few users. But, workflow is going to every user to whom project manager role has been given. How to restrict work item creation for single project manager which is mapped with project id/code on project master?

Thanks
Praveen Kumar

15 05 2013
Jonathan

Hi Praveen. Are you using Ax2009 or AX2012? There is a specific workflow template / type designed for Project based purchase requisitions that I believe handles this functionality quite well. Check out the Procurement and project management module training docs for more information on how to set this up. Otherwise you could look at customising the participant provider code on your approval.

Regards Jonathan

15 05 2013
Praveen Kumar

Hi Jonathan

Thanks for your quick response.
I am using Ax2012 feature pack. Will you please guide which workflow template have project based requisition functionality? I checked but didn’t infer/find any relevant template in both the modules.

Waiting for your response.. PLEASE HELP

Thanks ..
Praveen Kumar

27 05 2013
Jan

Hi Jonathan

I have a question i’m struggling with. The Purchase Order Workflow in AX 2012, I want to customize. I want to have – on creation – a new field ‘PurchaserApprovalLimit’ on Purchtable filled with the Signing Limit for the purchase creator. This field is to be used for test for Auto Approval.

The struggle is how to get this new field for test when setting up the workflow. We have added this field on maps, view and the PurchTableDocument Query. But still we can not see this new field on ‘Activation’ condition.

Hope you somehow can lead us into the light :-)

Thans

BR
Jan

3 06 2013
Shivaram

Can a same user submit and approve on a workflow on AX 2012?

3 06 2013
James

You can set a condition that if the requester= approver then auto approve.

3 06 2013
Shivaram

Hi James,

On AX2012 I don’t see options for requestor and approver. There is a workflow originator and I am guessing it is same as requestor but not seen anything for approver under auto approve options. Can you tell me what options should I select on each side of the =. Thanks in advance.

3 06 2013
Shivaram

Hi James,

On AX2012 I don’t see options for requestor and approver. There is a workflow originator and I am guessing it is same as requestor but not seen anything for approver under auto approve options. Can you tell me what options should I select on each side of the =. Thanks in advance.

3 06 2013
James

Yes, under automatic conditions choose automatic action as approve, and the condition can definitely be “Workflow.originator” is approver. I’m not in an environment so I don’t know the exact names but that will work

3 06 2013
James

Do you want this for one or a few people? Or do you want this rule for all requesters? If a few people then I would add multiple conditions “When workflow.originator = value (User ID) for each person with this right. If for everyone, I would say if Purchaserequisition.approval amount is greater than or equal to $0 then auto approve or some arbitrary condition that would auto approve everytime.

3 06 2013
Shivaram

Actually I have a reverse requirement. The approver should not be same as the submitter. This rule should apply for all users. I was trying to find out what option should I select for the fields on each side of the not equal. Sorry to add a little more challenge.

3 06 2013
James

The requirements are still unclear, but it sounds like you should use the Final Approver functionality. Mark this check box under “Advanced options” (Or a name similar). This functionality means if the person if the workflow originator is also the one assigned for approval, then someone else needs to approve. When you mark Final Approver, the user ID field will pop up and you can select the user to assign it to. You can also set up dual approvals and other options based on requirements.

4 06 2013
Shivaram

I think we are getting closer. Let me explain it clearly. I am using role based approval. In order to make sure that someone will be there to approve the journals submitted by the users, I have assigned the role that is allowed to approve to 2 managers. The requirement is if one of the managers submits a journal the same manager should not be able to approve. The journal should be approved by the other manager in the approval role. So at the approval step I have to compare approver with submitter and throw an error if they are the same. Thanks for your help.

4 06 2013
James

Okay, this is sort of tough but I think I would do a conditional decision (not approval) of is the workflow originator Manager X. If true, have it lead into an approval element assigned to the manager Y. If false, have it run into another conditional decision, is workflow originator Manager Y. If true, that leads to an approval node assigned to Manager X, if false leads into a different approval element assigned to both of them.

4 06 2013
James

On the last approval element, you can use the role based assignment. I think you would have to use UserIDs on first two approval elements but that solution should work.

5 06 2013
Shivaram

Thanks for the above. It’s a great solution and definitely works but is there no way avoiding using the userids in the workflow? The reason is the users could change because the employees can leave their job or move to different positions etc. Everytime this happens the workflow should be updated. Please let me know.

5 06 2013
James

Well if it is two managers, it sounds manageable. I would present that as an option as well as just having a role based assignment approval with a completion policy of all approvers. With this, they would have to approve their own requisitions, but it wouldn’t be approved until the other manager approves also.

20 06 2013
Gnanendra

Hi I have a qurey regarding the WF that when i have done the submit and when i am apprving a workflow , WF has history shwoied as Stopped(error).
Can you suggest me where i have check to resolve it.

Thanks in advance.
Gnanendra.

6 07 2013
Muhammad Haroon

Hi Jonathan

I am facing some problem while creating new workflows. When I am creating any workflow the system is popping following error

“An unexpected error occurred when opening the workflow. To solve the problem, check the event log on the server and AOS contact your system administrator.”

When I opened event viewer I saw following error:

Workflow threw an exception for the following reason: Invalid enum value ‘GMTPLUS0500ISLAMABAD_KARACHI’ cannot be deserialized into type Microsoft.Dynamics.AX.Framework.Workflow.Model.AxWorkflowServiceReference.Timezone’. Ensure that the necessary enum values are present and are marked with EnumMemberAttribute attribute if the type has DataContractAttribute attribute.

I tried following solutions but no success:

1. Deleted all files from xppIL folder and then did FULL CIL compile
2. Changed Time Zone of Operating System/Windows, Legal Entity, and User

I am facing this error in the company created by me whereas if I am not facing this error in ‘DAT’ company.

Will be grateful if you could help me in resolving this error.

Thanks in advance.

Haroon

24 07 2013
Nathan

Hi,

In the Escalation section of the Approval properties setup.
In the bottom tab section there are 4 standard assignment types [Hierarchy, Workflow user, User, None].
How can one extend the above Assignment Types to include ‘Participant’
The same functionality that happens for the Assignment section.

Thanks

25 07 2013
Budiyanto Chen

Hi Joe,

I tried to setup Budgeting Entries Approval, for amount < 1k, i want perform auto reject on Automatic actions, but always prompt error "A currency code must be specified for an amount field" when try to active the workflow even that i already setup for the currency code. Any idea?

25 07 2013
Jonathan

Are your budget entries complete, i.e. Does each line have a currency selected?

25 07 2013
Budiyanto Chen

actually i do setup for budget workflow, this error come from workflow setup. all the budget register entries with currency code.

15 08 2013
Anisha Fakir

Hi Jonathan,

Few queries:

1) On the Purchase Expenditure Reviewer form where can I set the financial dimension values for a reviewer? The help manual says its on this form but when I open the form there is no field/form that allows the input of assigning the values but displays only the financial dimension selection.

2) How can I include a budget check in my PO workflow? I have to send a PO for approval if the variance is <= 20% of the budget.

Thanking you in advance

Regards,
Anisha

15 08 2013
Jonathan

Hi Anisha. Can you confirm which version of AX are you using?

23 08 2013
Bart

Hi Jonathan.

Great blog, very recognizable. But i have a question. We are trying to make a report on what invoices a user has done a approval on (so history). I made this report based on the workflowworkitemtable. Now it seems that not all records are there anymore.

Did i use the wrong table? have you ever seen records “dissapear” in the WorkFlowWorkItemTable?

Regards,

Bart

23 08 2013
Jonathan

Hi Bart.

A really good table to build your report off as well is the WorkflowTrackingTable. It has a lot of the specific actions etc that happened in the workflow and who performed them

Regards Jonathan

23 08 2013
Bart

Thanks! I’ll try.

2 09 2013
Bart

Hi Jonathan. Thanks for the tip. with the WorkflowTrackingTable it seems to work!

28 08 2013
Matic

Hi,

Glad to see a blog like this.
For the past few days I have been trying to get to work workflow with three workflow types and use of line items:
WT1 has line items of WT2
WT2 has line items of WT3
WT3

If I use the following situations in workflow editor:
a)
WT1 has line items of WT2
WT2
or b)
WT2 has line items of WT3
WT3
the workflows work as expected.

Have you every tried with three or more workflow types? Any suggestions?
Thanks!

29 08 2013
Jonathan

Hi Matic.

Unfortunately I haven’t ever dealt with the scenario above with more than one set of line types.

Regards

31 08 2013
Anisha Fakir

Hi Jonathan,

It’s AX 2012. I found where the owner of the financial dimensions sit. Thanks

Questions:
1. I’m working with the vendor invoice journal workflow, which field do I used if I want to apply a condition based on either the credit or debit amount for the journal line? My condition is route all journal lines where the amount is <= R10k

2. How do I escalate approvals from the approver. That is User A is an approver in my workflow, should user A not able to approve a task in time, the workflow should got to User A's manager.

Thanking you

Regards,
Anisha

31 08 2013
Anisha Fakir

Me again, I discovered that the maximumdebit/credit voucher field is the field to use on the invoice journal to set an amount condition. However the requirement is that the journal will have multiple lines that must go to different users at the same time for approval. when the last user approves then the journal can be posted. How best can I set this up using the standard workflow invoice journal functionality. Im on AX2012

19 11 2013
FH-Inway

Is there a way to execute a single workflow instance or a single workflow instance step directly, i.e. not by using the workflow batch or the Tutorial_Workflow form?
So far, I found class SysWorkflowQueue, static method dispatch, but I wonder if there is an easier way to do it.

21 11 2013
Mindy

Hi Jonathan,
In AX2009 we have a workflow set up for expense management which allows expenses validation and approval. It works fine if the expense did not get rejected by validator. But if the expenses get rejected during validation process, most of the time the workflow will stop with error – ‘Stopped (error): Not submitted status cannot be changed to Pending validation status’ after the expense was resubmitted. This is happening intermittently, sometimes resubmit of rejected expense works fine throughout the workflow process, but most of the time the workflow will stop with this message.
Any idea what could have caused this?

Thanks.

Regards,
Mindy

21 11 2013
Dip

Hi Jonathan, regarding workflow approval via email in AX 2012 R2 RU7, the whitepaper says at “Appendix C: Configuring Service Bus namespace details in workflow parameters”, In the Base URL to approve/reject workflow field, enter the Service Bus details in the following format: namespace.servicebus.windows.net/EmailXX

Replace namespace with the namespace details and XX with endpoint number that is used to activate the Service Bus.

I am not able to figure out where to find this value XX? I am not able to execute this. May you pls find some time to demonstrate the same.

2 12 2013
Naul

Hi jonathan , I am trying to create a custom workflow in that what my need is whenever my Projsalesitemreq got filled that should go for approval of admin this form is located in Project management and accounting module of ax2012 in items tasks .. Please tell me is that configurable i tried creating that but not working.

5 12 2013
Jonathan

Hi Naul.

You need to enable to form for workflow approval (in the forms properties under the AOT).

5 12 2013
dfc1971

Hi Jonathan
It looks like you are Workflow guru! We have an issue with Workflows whereby a user is on holiday and turned on delegations. The problem is that the person to whom the delegation has been assigned is now able to approve their own travel! Basically, the workflow goes to the Company CEO (who is top of the heirachy) then delegated straight back to the workflow originator. Can this loophole be closed?

5 12 2013
Jonathan

Hi David.

You can use the final approver function as suggested by James. Another (slightly backwards) route that we have followed from time to time is to write your own Participant Provider to handle this type of exception. Essentially you could find the correct user, check if he has any delegation setup, if so and the delegation is to the requisitioner then assign to somebody different.

Another possibility is to add an additional step to your workflow configuration that only runs if the last approver is the same as the requisitioner. You would need to add an additional parm method to your WorkflowDocument class in order to expose the last approver.

5 12 2013
James

The final approver function on Advanced settings.

13 12 2013
Rajesh

Hello, I am trying to implement a workflow with parallel activity (with two tasks) and then an approval. Once a record is submitted to the workflow, it shows “Parallel activity started” and then immediately I see two errors – “Workflow stopped (error)”. There is no specific error message. It just displays Workflow instance ID. Can you please advise?

17 12 2013
Altamash

Hi Jonathan,

How do I Approve, Change Request or Reject a workflow from code?

I have got a requirement to show Vendor Payment Journal records which are submitted to workflow in a custom form and then use multi-select functionality to approve more than one record in one go. I don’t think approving multiple records will work with standard workflow action bar so I have planned to use a custom button. On the click of the button I can identify the selected record ids and then somehow I want to approve them by passing each recid to a custom class or in the clicked method of the button.

Any help would be great.

Cheers
Altamash

17 12 2013
Jonathan

Its fairly easy to accomplish your goal. You just need to gather some information regarding the action that you are going to be taking. #1. Find the workitem related for each record #2. Find the MenuItemName linked to the action that you want to perform from the workflow template / approval in the AOT.

You can then call the following code: WorkflowWorkItemActionManager::dispatchWorkItemAction(workItem,”A comment”,[user to delegate to if doing a delegate action or “”], WorkflowWorkItemActionType::Complete (the action type that you are performing), [MenuItemName], [true/false are you submitting from the web]);

17 12 2013
Altamash

Hi Jonathan,

I am struggling to find an example for finding workitem related to each record.

I saw dispatchWorkItemAction will do what I am trying but real issue I am facing is to get the workItem.

17 12 2013
Jonathan

You can just select from WorkflowWorkitem table using “userId”, “RefTableId” and “RefRecId” as filters to find the workitem related to specific user and record.

Regards

17 12 2013
Altamash

Thanks for the pointer Jonathan, one last question on this hopefully :). “userId” to be used in filter will be userId of submitting user or user id of approver? We are using group based assignment with percentage of approvers as completion policy.

Sorry about a bit dumb questions, I am in process of learning about WFs mechanism.

Regards,
Altamash

17 12 2013
Jonathan

You will use the userid of the person who is assigned the record

17 12 2013
Altamash

Awesome, thanks again Jonathan. Really appreciate it, you saved me a few hours on this.

Cheers
Altamash

18 12 2013
Tyler

Great Blog! I’m having difficulties mapping out how to create an AP Invoice matching variance workflow that will direct the approval back to the purchasing agent. The out of the box workflow doesn’t appear to have the purchasing agent as an available option within a conditional decision. AP is fine with posting an invoice with a discrepancy as long as the purchasing agent approves. I feel like this has to be a common request?

Thanks for your help!
Tyler

7 01 2014
James

Is the purchasing agent the workflow originator? Sounds like you should use workflow user assignments or conditions based on workflow users i.e. workflow originator

7 01 2014
James

Hi Jonathan, When you click Submit on the workflow task bar and enter a comment, where is that comment visible besides the Pop-up (but not notification) or View History> Tracking details? Thanks in advance.

16 01 2014
Diego

Hi Jonathan, I’m facing problems with the Workflow Editor since I have an implementation where the workflow contains hundreds of items. Sometimes after some changes we cannot even save it or the whole AX32 hangs. Do you know if there is some limitation or recommendation regarding the number of items you should draw in the Editor? I’ve read in other blogs about other guys experiencing client failures with 150-200 items or more. This is for 2012 R2. Thanks in advance!

16 01 2014
Jonathan

Hi Diego.

I haven’t had experience with that large number of items in the client (in 2009) at least. May I enquire as to why you have so many elements? Normally there are other options available to you to help simplify the configs (e.g. subworkflows, better participant providers etc)

17 01 2014
Slava

Hi Jonathan,

I have a question regarding AX 2009 workflow that I hope you will be able to answer.

I have a workflow where on one of the approval steps is assigned to a group of users.

The problem is that the list of users in the responsibility group can change after the workitems creation and assigment process.
I’m wondering if there are a way to create/duplicate a workitem for a step in workflow to assign it then to a new members of the group.

I would really appreciate any help on this.

Regards,
Slava

17 01 2014
Jonathan

Sadly in AX2009 there isn’t an easy way, you need to cancel the workflow and resubmit it. AX2012 has introduced Queues to help resolve this scenario

3 02 2014
Slava

Thanks you, Jonathan.

28 01 2014
Sam

Hello Jonathan,
I have a simple ( hope ) question for you.
I have ax 2012 workflows, sometimes when user submit PR in WF, the WF get stucked and some time it proceeds normally, also sometimes after the user accept & complete the PR it stuck without errors or warnings and this also happens sometimes when user approve PO ..
Thanks in advance

28 01 2014
Jonathan

Best to look at the event log.

28 01 2014
Sam

Thank you for quick response.
the workflow message processing has an error for batch job id 5637149422 .. can this be the problem ? where’s the best to look for event logs?

29 01 2014
Sam

X++ Exception: invalid tracking submission expected context Workflow and expected type Submission actual context Workflow and actual type Fault.
at SysWorkflow-faultWorkflowInstance
SysWorkflow-internalFault
SysWorkflow-fault
WorkflowTrackingTable-saveTracking
SysWorkflowWorkItem-escalate

29 01 2014
Michael Reyntjens

Hi,

Can you help me with following issue : I have set-upa WF for invoice approval in AX 2009 , and following issue occurs : When starting the workflow a first time, a workitems is created and shwon in the workitemlist.. The fisrts approval steps works OK, but any other invoice that is submitted immediatly cancels the workflow : However, in the workflow history I see that an approavl steps isc reated (at least the creation is mentionned , but doesn’t show up), immediatly after this the workflow cancels. Any tips and tricks on how to debug this kind of issue ( my collegue mentions that debugging of the batch task is tricky … )

30 01 2014
Vimalkumar Deenadayalan

Hi Jon,

Can you let me know how & where to use Workflow Providers?

Thanks,

6 02 2014
3 02 2014
Altamash

Hi Jonathan,

Just wondering if AX 2012 workflows allows you to write to files?

I have a requirement to automatically generate the bank direct credit text file once the Vendor Payment Journal is approved via workflow. I have written the custom code and tested it by invoking it from a job and code itself works fine without any issues. But the same code when executed via workflow approval comes up with file opening error. I have checked that all my code is running on server and have given appropriate permissions on folders etc.

Any ideas?

Cheers
Altamash

6 02 2014
Jonathan

Have you used the necessary asserts? There shouldn’t be a problem writing to files via workflow.

10 02 2014
Eric

Hello,

We are trying to figure out the notifications for our work flows. We would like to know where the notification is setup for when a workflow is submitted. We know you can configure notifications on certain elements but we do not know when the initial notification comes from. For example when a user submits their timecard the project managers on the time line gets a notification saying that they have time lines to review but we did not configure an alert for this inside the workflow.

Any help would be great.

Thanks

10 02 2014
James

Assuming you are working in AX2012, when you double click an approval element, the text entered in the Basic Settings tab becomes the text on the notification. Without double clicking the approval element (without drilling into it), the Basic Settings tabs allows you to specify when and to whom should receive an alert i.e. purchasing agent gets alert when his PO is approved by manager. Manager gets an alert automatically containing the text defined in the details above as built into the workflow

10 02 2014
James

Assuming you are working in AX2012, when you double click an approval element, the text entered in the Basic Settings tab becomes the text on the notification. Without double clicking the approval element (without drilling into it), the Basic Settings tabs allows you to specify when and to whom should receive an alert i.e. purchasing agent gets alert when his PO is approved by manager. Manager gets an alert automatically containing the text defined in the details above as built into the workflow

10 02 2014
Eric

Yes we are working with AX2012, we understand that the text in the basic setting is used by the notification but we are wondering what tells the system to generate a notification when the timecard is submitted. Also would you happen to know how to modify the generated notifications for grouped line-items?

Thank You

10 02 2014
James

The system will generate a notification in any workflow for the approver anytime something is to be approved. Any workflow will send a notification to the assigned person letting them know there is an item they need to take action on. You can specify additional notifications to i.e. workflow originator on the other Basic Settings tab. Your second question is a little loaded to address here. Thanks

10 02 2014
Eric

Thank You for taking the time to reply, Can you point us in the right direction for the Grouped Line-Item Notification Modification?

12 02 2014
itguy

Hello Would you happen to know why AX2012 sends a notification when a Approval is returned and then sends another notification saying the Record was returned? I know the Approval notification is configured in the work flow but why does a second notification get sent and how can we prevent it?

Thank You

13 02 2014
Jonathan

There is always a notification to the new responsible person when a workitem is assigned or reassigned. With returning a record the work item is reassigned to a new user, hence the notification. You have also setup an extra notification inside you config, hence the two notifications

On Wed, Feb 12, 2014 at 7:23 PM, Dynamics AX Workflow Wanderings wrote:

>

13 02 2014
itguy

Ok so the problem with this is that our configured notification uses place holders to communicate information to the users. The automatic one uses some generic information. Because we are using Email notifications users get 2 emails. How can we modify/disable the “Record” alert and just have the “approval” Alert.

It is very frustrating that something as simple as notifications are so hard to get working in AX2012.

Any help is appreciated.

Thanks

13 02 2014
Jonathan

Hi.

From the sounds of it you are actually trying to disable to “approval” alert, i.e. the one that gets sent to you because the workitem has been assigned to you. There is no way to disable this for a specific action, e.g. if you are assigned it because it has been returned to you. You can simply deselect the Email Template Under your workflow settings in System Admin and Org Admin if you want to disable all “assign” emails disabled.

Regards Jonathan

13 02 2014
itguy

We have removed the Template in these two locations and setup a template on the workflow itself but we still receive the 2 emails. The reason I called it Approval and Record is because the notification we configured says “Approval Returned” The System one Says “Record Returned”. It sounds like we are stuck with this configuration…

Thanks

13 02 2014
Jonathan

Remove the template on the workflow itself. This is basically an override for the other two.

13 02 2014
itguy

But then we wouldn’t get any emails right?

13 02 2014
Jonathan

No just assignment notifications

>

13 02 2014
itguy

If I remove the templates from the system and organization as well as from the workflow wouldn’t that disable all workflow emails?

14 02 2014
Jonathan

Hi. The email templates setup are only for the assignment notifications. So if you remove these templates from Organisation Admin, System Admin and the workflow configuration nobody will recieve “assignment notifications” however they should still recieve any Manual notifications that you have setup in your workflow config. E.G. A notification to a user on “Return” or on “Completion” of the workflow.

I hope this helps clarify if not please drop me an email.

28 02 2014
suresh

HI,

how to approve workflow through code…..

28 02 2014
suresh

HI,

how to approve workflow through code…..

Thanks,
suresh

28 02 2014
FH-Inway

Reminds me of my own question on November 19th 2014. In the end, I used class SysQorkflowQueueTask to run a step of the workflow process. To use the class you need the right record from SysWorkflowMessageTable. To get that record you need the table and record id of the record for which the workflow is processed. This should suffice in most cases, but if you have two or more workflows going on for the same record, you also need the correlationId of the workflow.

5 03 2014
sureshkumar552

HI,

how to approve workflow through code…..

thanks,

5 03 2014
Ram

Hi,

Any samples to approve the workflow through code. For example in our case a approval task will be assigned to a system user, based on certain conditions we need to approve/reject the workflow automatically through the code

14 03 2014
dfc1971

Another workflow issue brings me back to this fantastic blog!
We have had a number of workflows ‘stall’ over the last week or so. By ‘stall’, I mean the associated document stays in ‘review’ status, despite the last approver in the hierarchy having completed their approval.
In other intsances the workflow has failed to create a Work Item for the next user in the approval heirarchy.
In each instance there are no Stop errors against the workflow.
The hierarchy appears to be valid. Futhermore, when there have been issues with the hierarchy in the past, there has been a hierarchy related Stop Error against the workflow.
Finally, we have observed this against both “Purchase Order” and “Project Budget Revision” workflows.
Any ideas??

14 03 2014
Jonathan

Hi David, normally “stalled errors” are related something wrong with the batch process getting stuck. Either the batch server settings in AX are incorrect or the workflow queue got a bit corrupted. Perhaps try reviewing the event logs on both AOS and Batch machines. View the main event logs as well as the workflow specific event log.

Kind Regards Jonathan

On Fri, Mar 14, 2014 at 5:45 AM, Dynamics AX Workflow Wanderings wrote:

>

19 03 2014
Jenny

Hi

I am setting up a case workflow and would like the comments that the users enter to be available in the history. I have used %Workflow.Last note% in the notification which works for straight forward workflows. However, we have a scenario where there is a parallel workflow running and on the manual decision that I have embedded in the parallel workflow the comment does not pull through to the history.
Have you come across this before in AX 2012? Is there a standard AX way around this? Is this a bug? Could it be developed to pull through?

Thanks

20 03 2014
Jonathan

Hi

Thank you for the question. I dont believe this issue is a bug as that tag only deals with the active workflow not sub or parallel workflows. If you are using the Purchase Requisition workflow you will find a last comment (or similar) in the set of Purchase Requisition fields that should pull this through. If you want to do this for other document types copy the PurchReqTable::mostRecentComment method. (you may need to create a new parm method in the document classes, but that code should get you started.

Regards Jonathan

On Wed, Mar 19, 2014 at 11:37 AM, Dynamics AX Workflow Wanderings wrote:

>

20 03 2014
Jenny

Thanks very much for your reply Jonathan!

23 04 2014
OaK

Hi Jonathan,
I’m new in DAX administration. Currently I’m using AX2009 workflow and have problem in “set condition for use”
example: for purchase requisition condition is can be use only specific amount . the condition tested with test data returns “fault”. when I activate and create PR exactly the same as test data of “fault” returns workflow still need to submit and still go through the workflow process just like those data which returns “true”

environment: I have only 1 PR workflow template active and also latest version active.

questions:
– when the condition is not met do we need to submit workflow?
– how can we skip some of not met condition not go through workflow?

thanks in advance.

best regards,

25 04 2014
Maris

In WF there is Conditional decision element, with True and False branches.

But it is not usable in cases, an example, when I need to check some field value and only move forward to next steps, if needed value is met. It could be done by True branche. But what to do with False branche? I don’t need to do any actions in case of False. How to solve that kind of situation? Or should I use some other elements and other approach?

21 05 2014
Aarvi

Hai Jonathan,

Warm Wishes. I have a question for you regarding Workflow. In workflow editor, I am configuring for a bonus workflow. On selecting Step > Properties > Assignment > Assignment Type (tab), I am selecting Assign users to this workflow element as Hierarchy. In Hierarchy Selection, I am selecting Hierarchy Type as Managerial Type. In Start from: field, it lists Hierarchy tokens: Workflow Originator and Workflow Owner. I need to list additionally the following tokens: User ID or Person or Requestor option in it. I could see that options in User workflows.

Can you tell me how to add or list those options? Also tell me in which Class and/or AOT objects I need to do the modification(s)?

Thanks,
Aarvi

22 05 2014
Jonathan

Hi Aarvi.

If you add a parm Method to your workflow document class that returns an EMPLID in AX2009 or a HCMWorkerRecId in AX2012 there should be other options available to you. You can look at the PurchReqDocument class’s parmRequester for an example.

Regards
Jonathan

21 05 2014
Guillermo

Hi,

I have a problem with a workflow in AX2012. I want to use a parallel activity, but with independent branchs. I mean, I don´t want to have to finish all the branches to finish the process. I mean, if the first branch finishes, I want all the process finishes. Could you help me, please? Thanks so much.

22 05 2014
Jonathan

Hi Guillermo, I dont believe this is possible using parallel activities. The one option that you have is to have auto-completion policies setup on all the activities so that they complete automatically after a period of time. Alternately, depending on your process, you can either assign a single approval to multiple people with a requirement that only one approves. If you need more advanced assignments for the single step e.g. Assign to CEO, Joe blog and Financial manager at the same time, you can write a custom participant provider class to accomplish this.

22 05 2014
Guillermo

Thanks, Jonathan, but do you know if it´s possible to change the logic parallel activities to process each branch independent? I mean, changing the logic of the workflow controller by code X++? Thanks for your attention.

22 05 2014
Jonathan

Hi Guillermo,

The parallel activities do run independantly, hence them being unable to influence each other. Please can you mail me an example of what you would like to accomplish and I can try and provide a solution.

Regards Jonathan

On Thu, May 22, 2014 at 9:33 AM, Dynamics AX Workflow Wanderings wrote:

>

24 05 2014
Vimalkumar Deenadayalan

Hi Jonathan,

As you can see, there are more ‘Start From’ options for Procurement and Sourcing Workflows like ‘Preparer, Requestor, Submitted by’ in addition to the regular ‘Workflow originator & Workflow owner’ when we use the Assignment type as ‘Hierarchy’. How can we get more ‘start from’ options in custom created workflows?

i.e, if I am creating a workflow for Recruitment Project, i need to get ‘Recruiter & Hiring Manager’ in the options which we enter while creating the recruitment project.

Your help is much appreciated.

Thanks.
Vimalkumar

2 06 2014
Aarvi

Hi Jonathan,

After I submit a record to workflow, it stops there. When I look into in event viewer, it shows below error. May I know what could be the reason for this error.

“Workflow Instance ID: 000133_002 System.Runtime.DurableInstancing SysWorkflowQueue-resume SysWorkflow-save SysWorkflowWorkItem-createWorkItems SysWorkflowWorkItem-create at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.Runtime.DurableInstancing.InstancePersistenceContext.EndOuterExecute(IAsyncResult result) at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.OnPersisted(IAsyncResult result) at System.Runtime.AsyncResult.SyncContinue(IAsyncResult result) at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.Persist() at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.CollectAndMap() at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.Track() at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult.InitializeProvider() at System.Activities.WorkflowApplication.UnloadOrPersistAsyncResult..ctor(WorkflowApplication instance, TimeSpan timeout, PersistenceOperation operation, Boolean isWorkflowThread, Boolean isInternalPersist, AsyncCallback callback, Object state) at System.Activities.WorkflowApplication.IdleEventHandler.OnStage1Complete(IAsyncResult lastResult, WorkflowApplication application, Boolean isStillSync) at System.Activities.WorkflowApplication.IdleEventHandler.Run(WorkflowApplication instance) at System.Activities.WorkflowApplication.OnNotifyPaused()”

Thanks in advance,
Aarvi.

17 06 2014
Lourdes Castro

Hello Jonathan
Is a please to talk to you, i have a client on Ax2012. Sometimes the user can send the workflow two times on different moments.. and on the historic information you can see two tasks on pending… do you know why this occurs? or on what situations you can have two workflow aprobal tasks? On the workflow configuration, i have configurate two aprovers with the “All the aprovers” configuration to go to next step of the W , but it usually just create one line not two.
Hope you can help me.. i can send you images if you want :)
I really appreciate your help

25 06 2014
Dona

Hi Jonathan,
In AX 2009, after a submit a standard project purchase requisition, the actions dialog is not the same for everybody. For some the dialog displays twice the action “Cancel”. How i can debug it

Thanks in advance
Dona

25 06 2014
Jonathan

Hi Dona.

I don’t understand the two cancel buttons, but for the rest check that they are all in the exact same step of Workflow and that their security options are the same. It is also possible that you are running multiple configurations and some have various actions disabled.

Regards Jonathan

On Wed, Jun 25, 2014 at 11:44 AM, Dynamics AX Workflow Wanderings wrote:

>

25 06 2014
dona

Thanks for your response Jonathan, I confirm the security is the same. May I send you screenshots of this ? Can you send me your email address please
Thanks
Dona

26 06 2014
Dona

Hi Jonathan,

You known the way i can debug the creation of actions dialog(approve, reject, cancel, change request…). I checked WorkflowWorkItemActionDialog but it doesn’t work :-( :-(

Have you an idea

Thanks in advance
Dona

26 06 2014
Dona

Hi Jonathan,

I found the bug, in fact when the user is the originator, a “Cancel” button is added in addition in the action dialog..
==>Class SysWorkflowFormControls\getActionBarContentForWorkItem :-) :-)

Dona

2 07 2014
Murugan Kumar

Can the workflow approver make changes to the document before approving it. Right now it looks like they can only request a change and send the document back but not actually make the change.

2 07 2014
Jonathan

Depending on the workflow and how you have configured your form. Workflow generally only changes a status and then you code your form to respond to the status. For purchase requisitions during the “Pending Completion” stage the assignee can edit, but during the Approvals they cannot.

Regards Jonathan

On Wed, Jul 2, 2014 at 8:04 AM, Dynamics AX Workflow Wanderings wrote:

>

3 07 2014
Murugan Kumar

Thanks Jonathan, appreciate your respons

9 07 2014
Shon

Hi Jonathan,

Is it possible to create new hierarchy provider in AX 2012 which will have a logic written to have a workflow to follow a sequential approach.

Also can you please guide on a scenario:
Lets say I have 11 level of approval based on approval amount which is grouped by procurement category , dimensions like cost centre , department etc.. . In this case a PO submitted should flow from level 1 to level 11 sequentially and should identify the users belonging/ based on PO’s procurement category, dimensions and approval amount.

Configuration to be done : A single step workflow with assignment type as Hierarchy and Hierarchy type to given as the new custom hierarchy provider.

Any pointers would definitely help.

Shon

9 07 2014
Jonathan

Hi Shon.

I’m busy with something very similar at the moment, however regardless of Provider type (hierarchy or participant) You will need to setup multiple steps in your approval. One for each level. If you do not necessarily want all 11 steps to be processed then you can add conditions to each step. Practically speaking this is what i did / would do.

1. Create Custom Participant Provider class. That provides tokens “Level 1”..to.. “Level 11” 2. Create resolving methods for tokens “Level 1”..to.. “Level 11” 3. Add a parmMaxLevelRequired method to your document class for your workflow that return the highest level that you need to run for a given document. 4. In your configuration create 11 Steps in the Approval node. 5. For each step add a condition e.g. if PurchReq.levelRequired < 1 6. For each step assign to the correct token from the Participant provider.

I hope this helps. Kind Regards Jonathan

On Wed, Jul 9, 2014 at 3:02 PM, Dynamics AX Workflow Wanderings wrote:

>

11 07 2014
Shon

Thanks Jonathan for the response, but as suggested to create 11 steps it wont be possible as each step is a combination of dimensions , procurement category meaning that for a single procurement category we can have same 11 levels and it will again be different based on combination of dimensions which will be like a 3 digit steps (more than 100) and that will be difficult to manage.

Also in participant provider , it results in parallel approval but the requirement I have is sequential approval. Considering the fact that we have standard hierarchy provider which follows sequential approval based on reporting hierarchy.

So any suggestion or approach that is possible to achieve this?

Thanks in advance!!

11 07 2014
Jonathan

Hi Shon.

I do understand your issue and my previous suggestion aims to resolve that as we have done exactly what you describe. Using a participant provider doesn’t mean that you have to have parallel approval. The participant provider would have 11 tokens being returned, which can be selected on your workflow configuration for 11 SEQENTIAL steps. Each of these tokens can then be resolved differently based on procurement category or dimensions. By adding a conditional “parm” method to your workflow document and config you wont have to execute each of these steps, only the number required by the document in Question.

Steps
Provider assignment
Condition

11 07 2014
Shon

Thanks Jonathan, the suggestion to have 11 steps/matrix looks good but I have a question.

Lets consider two scenarios also below assumptions
Matrix 1 – approval amount 1000$
Matrix 2 – approval amount 5000$
Matrix 3 – approval amount 10000$
Matrix 4 – approval amount 20000$
Matrix 5 – approval amount 50000$

1st scenario:
If PO is submitted for an amount of 15000$, the expected workflow is to flow from matrix 1 to matrix 4 and should skip matrix 5 or any higher steps defined in config.

2nd scenario:
If PO is submitted for an amount of 45000$ and the user submits has the right to approve an amount of 10000$ , in this case the workflow should start from matrix 3 and should end matrix 5 and thereby skipping the matrix 1 & 2.

How these scenarios can be handled if we are defining more than 1 step in workflow configurations.

11 07 2014
Jonathan

Hi Shon.

You can add Parm methods to your workflow document class and then use them in your conditional statement. In your examples you could either have two methods i.e. “Minimum level and Maximum Level” or you could have 11 methods e.g. “mustExecuteLevel1… mustExecuteLevel2…”

Regards Jonathan

On Fri, Jul 11, 2014 at 2:34 PM, Dynamics AX Workflow Wanderings wrote:

>

11 07 2014
Shon

Thanks a lot Jonathan , the idea really helps!!

25 07 2014
Ron

Hi Jonathan,

I setup a Purchase requisition line, with an assignment “Workflow user” -> “Work item owner”. I get the following error but I don’t understand why ? It seems that is a bug…

Stopped (error): X++ Exception: This workflow cannot continue processing because no users were retrieved for the current workflow step. Contact your system administrator.
at SysWorkflowServiceProvider-resolveParticipant
SysWorkflowQueue-resume

Do you have an idea ?

Kinds regards
Ron

25 07 2014
Jonathan

Hi Ron

I dont think you can use “Workitem owner” option for assigning workitems, its more for use in sending notifications, or possibly escalation

Basically by selecting that option you’re saying assign my workitem to whoever is currently assigned to that workitem, which in your case is no one yet.

Regards Jonathan

On Fri, Jul 25, 2014 at 10:34 AM, Dynamics AX Workflow Wanderings wrote:

>

31 07 2014
Fatih Gork

Hello, I have a question:

I have 3 positions (000001, 000002 and 000007) and I have 3 signing limits for each.
Reports to hiearchy of positions is like following:
000002 reports to 000007, and 000007 reports to 000001.

Spending limits of positions is like following:
000002 and 000007 are based on the same job. So, their approval and spending limits are the same. Which is 1000 for spending and same for approval.

000001 have both limits at 10.000.

I have a workflow, that has:
Start
Task
End

And task step is configured as shown in the picture:

Now, I have a PO, with a total amount of 85.00.
-All prices and signing limits are set to same currency-

My problem is that: Workflow always skip the first step of the hierarchy:

If the requester of Purchase order is the guy set to position 000002: Workflow goes to 000007.
If the requester of Purchase order is the guy set to position 000007: Workflow goes to 000001. Despite of requester’s spending limit is above the PO’s balance.

Do you this kind of bug at AX 2012? Or can you see anything wrong in my set ups?

I have been working on this issue for almost a week. Read a bunch of forum and blog posts, but could not find a solution.

Please note that I would like to create a workflow in that way, for Purchase orders. Not requisitions.

Thanks,

31 07 2014
Jonathan

Hi, from your descriptions it seems as though workflow is functioning correctly. From your example described, the actual limits will play no part as an 85.00 purchase order is below everones limits. Using your config, where you start at the requester, it seems as though its finding the correct next people in the chain. COuld you maybe state who you are expecting the workflows to assign to?

On Thu, Jul 31, 2014 at 7:51 AM, Dynamics AX Workflow Wanderings wrote:

>

11 08 2014
pranav1724

Hi,
I have a question.
I need to submit the GL journals created to the workflow automatically, for this i found that Workflow::activateFromWorkflowType Method is useful.

But now i need to find that how could i get the “WorkflowTypeName” from the “JournalNumber”, so that i can pass that workflowTypeName to the above method.

1 12 2014
Rao Javed Akhtar

Invalid enum value ‘xxxxxx’ cannot be deserialized into type ‘Microsoft.Dynamics.AX.Framework.Workflow.Model.AxWorkflowServiceReference.Timezone’. Ensure that the necessary enum values are present and are marked with EnumMemberAttribute attribute if the type has DataContractAttribute attribute. error in ax 2012

1 12 2014
Rao Javed Akhtar

any one can resolve this error.

3 06 2015
anjali

KB 2989515 Title – Workflow configuration raises error Invalid enum value ‘GMTPLUS0200ISTANBUL’ cannot be deserialized into type is available for the issue. deploy this hotfix and you are ready to go.

15 01 2015
karan sambher

Hi,
I have a question.

Workflow notification list not showing enough details
I have created a customized workflow for Travel and Expenses to meet the requirements of the desired process.W orkflow submission and approval is working fine except the notification list . Suppose user of the process submits the document for approval , notification list does not contain the full information regarding record for which the workflow has been submitted . Deatils of the record for eg. Document ID of that record should also come in the notification list SUBJECT field. Please help…
thanks in advance :)

16 01 2015
Vickie

I have a question.

I am creating a Purchase Order Approval Line workflow and my client would like to create a condition that if the vendor or price is missing the workflow will route back to the requester. How do I setup the task for Review Purchase Order Line to route back? What assignment type will allow this process?
Thanks,
Vickie

13 02 2015
Dan

Hi,

If you delegate downwards in a workflow hierarchy does your signing limit get delegated to the person you assign to or do they keep the signing limit originally assigned to them? If so is there some way to get round this issue so you can delegate downwards?

Cheers

Dan

13 02 2015
Jonathan

Hi Dan

Can you maybe elaborate a bit on what you are trying to do. Signing limits should always be based on the person to whom it is assigned to.

On Fri, Feb 13, 2015 at 9:00 AM, Dynamics AX Workflow Wanderings wrote:

>

5 03 2015
Imthiyaz

Hi,

I have question regarding the Workflow. I wrote a custom code on the workflowTrackingStatusTable – Update method – Post event. I am creating a project in my custom code based on conditions & code is working fine. I wanted to show the infolog saying the project Id is created once workflow is status is completed.Workflow engine is running as Batch job, but when i stop batch job & run the Tutorial_WorkflowProcessor form manually, it does show me the infolog. Please help me in showing the infolog. If not atleast on the workflow history – tracking details message window.

Regards
Imthiyaz

9 03 2015
Jonathan

Hi.

I hope I understand your question correctly. You will not be able and shouldn’t really show your message in the workflow History form, but rather on your document itself. I would recommend that you place your code in the completed event handlers on your workflow and get it to update a field on your document with the correct ProjId. If you really want to respond immediately with messages to the users, the only way to do that is by adding code to your “Approve” menuitems.

On Thu, Mar 5, 2015 at 8:18 AM, Dynamics AX Workflow Wanderings wrote:

>

11 03 2015
Imthiyaz

Thanks Jonathan for your reply. Actually, I also wanted to catch some warnings or errors messages thrown by system when creating a project & show to user, so that user can correct the issue. I tried to read infolog after i call the ProjTable – validatewrite() method in my custom class & update a custom field in a table, but it is not reading any data from infolog. When I tried to run same class calling from a job, it does read the infolog & updated my table. So, does infolog accumulates (infolog.add) the messages in Workflow processing or not? Another option which i wanted to keep as last, is to creating a alert, so while workflow is processing, can we create a custom alert?

Regards
Imthiyaz

13 03 2015
Mak

Hi. Is it possible to have one workflow on same server for AX 2009 and AX 2012. Or need to create two separate workflows? Which issues may appear for the first and second cases?

13 03 2015
Jonathan

Hi Mak.

If you have AX 2009 and AX2012 running on the same server you can certainly run workflow on both. AX2009 makes use of a workflow website in IIS whereas 2012 does not so there should be no conflict. Does this answer your question.

You cannot get a workflow in AX2009 to talk to a workflow in AX2012 though.

On Fri, Mar 13, 2015 at 12:28 AM, Dynamics AX Workflow Wanderings wrote:

>

18 03 2015
amit

hi Jonathan,

first of all would like to thank you to publish such a good blog.
Also request you to guide me in a problem

“error : Stopped (error): X++ Exception: Work item could not be created. Insufficient rights for user XXX

at SysWorkflowWorkItem-create

SysWorkflowWorkItem-createWorkItems

SysWorkflow-save

SysWorkflowQueue-resume


but I have admin right also I have added EPPuchTableInfo in my privilege
still getting same error

could you plz help me in that

Thanks

19 04 2015
tajwal

Hi Mr. Jonathan

I have developed and configuration workflow for Purchase Order in Dynamics AX 2009.

once purchase order is submitted to workflow after procurement manager it will go to the person for approval who approved the last step of Purchase Requisition in PR workflow.

from workflowTrackingTable I can find the last person who approved the workflow and I store it in PurchLine table.

now I do not know how to configure the step in PO workflow to assign workflow step to him in Purchase Order configuration.

20 04 2015
Jonathan

Hi.

I have replied via community forums: https://community.dynamics.com/ax/f/33/t/158274.aspx

On Sun, Apr 19, 2015 at 5:47 AM, Dynamics AX Workflow Wanderings wrote:

>

5 05 2015
Ricardo Santos

Hi Mr. Jonathan!
I got a strange problem, if any workflow item stop for any error gets “freeze” (is pending forever) after i click resume as if not being in the queue. Use the Tutorial_worklowprocessor not solve the problem.
Can i see what is in the queue in realtime?
I am using AX 2009

6 05 2015
Jonathan

HI Ricardo. IN AX2012 the table is called SysWorkflowMessageTable. In here you can see what is queued.

6 05 2015
Ricardo Santos

Thanks for the reply.
In AX 2009 this table is called WorkflowMessageTable.
I found that after I click continue the work item has not returned to the queue, but I have not figured out why. This only happens when you click Continue, you’ve seen this error before?

12 06 2015
Shereen

Hi Jonathan,
I would like to write a class for Ax2012 Workflow Heirarchy, but not sure how to go about it. Similar to a particpent provider. i actually do not want to use the mangerial heirachy setups – i just need to return a user based on the context record(like a particpent) for escation. Shereen

15 06 2015
Shereen

Hi Jonathan, if you can help in any way please. I need to escalate to a specific user (depending on the context record) – ax2012 escalation options only allows for Heirachy and not participent providers. i am trying to write(hack) a Heirarchy class – have you any examples please. Where i dont actually have to set up a real user heirarchy. Email me on shereen131064@hotmail.com.Thank you in advance.

18 06 2015
omar

after i created workflow on dynamics ax and click submit the submit button then will be hidden and the yellow line appear in the bottom not in the top

18 06 2015
omar

after i created workflow on dynamics ax and click submit the submit button then will be hidden and the yellow line appear in the bottom not in the top so what can i do

18 06 2015
Acasb

Hi Jonathan!

I have a Budget Register Entry Review Workflow, but I want to associate it with an specifc entity, I made the change into the table Workflowtable but I have the same funcionality as associate to Organization- wide. I had been investigate and I found that the Budget workflow’s can’t associate to a entity, they’re only avaible for Organization- wide Can you confirm me this?

19 06 2015
Jonathan

Hi Acasb. Just two points. Firstly you should not be changing workflow data directly in the tables, you will create problems. Secondly the tables behind your workflow are not saved per company. If you want a different workflow per company you will need to use conditions within your configuration to divert workflow based on BudgetModelDataAreaId or similar field on your Budgettransaction tables…

20 06 2015
Acasb

Hi Jonathan!

I appreciate your answer . I will try to do that. Thanks!

22 06 2015
vickie.morris@polypore.net

Hi Jonathan,

I am designing a PO workflow in AX2012 CU6. I have my conditions working with the exception of the following criteria. If the Purchase type of the Purchase order is “Returned order” is should not process through the workflow. It should be auto approved.

I setup a condition Purchase orders.Purchase type is value Returned order to auto approve but it is not auto approving. I have an auto approval setup.

Any help would be appreciated!

Thanks,
Vickie

30 06 2015
Alex Pullens

Hi Jonathan,

When I reject a workflow workitem the workflow process stops, but is assigned to the worklow batch user. Can I influence in any way the assigned to user after rejection of an approval step?

Tnx for your response in Advance.

Alex

30 06 2015
Jonathan

Hi Alex.

Is this for purchase requisitions? Rejections will go back to the “originator” for re submission into workflow.

On Tue, Jun 30, 2015 at 3:49 PM, Dynamics AX Workflow Wanderings wrote:

>

30 06 2015
Alex Pullens

Hi Jonathan,

Thanks for your reply.

No it is not for the Purchase requisition. It is for a custom made workflow that is automatically submitted by the workflow batch user.

Do you know whether it is possible to influence the originator on submitting?

2 07 2015
Jonathan

Hi Alex.

In the class behind your Submit button you should have a line somewhere like: Workflow::ActivateFromeWorkflowType(…). The 5th parameter is the originator userId

29 07 2015
Nabeel

A very simple question: I want a group of users to approve the workflow or one power user like CEO can approve it. So I want ORing condition in the Approval Step. Possible ?

29 07 2015
Jonathan

Hi Nabeel. Unfortunately not, you would have to do some heavy customization to the framework to allow for this “OR” scenario as all assignees are treated equally. You can of course have multiple levels with time limits or multiple approval levels (AND scenario). I.E. If all the users in the group don’t approve within a time then the CEO should approve or vis versa.

On Wed, Jul 29, 2015 at 9:40 AM, Dynamics AX Workflow Wanderings wrote:

>

29 07 2015
Nabeel

Thanks alot for your kind reply. It was quick and really helpful. Thanks alot.
Let me know if we can have any configuration workaround for it.

24 08 2015
Tarren

Hi Jonathan

I have installed the workflow but the installation process completed with warning status. I ignored the warning and then tried to setup workflows in my ax client in Administration -> Setup -> workflow infrastructure configuration wizard. when i try to validate the workflow url it gives me following error.

The request failed with the error message:

Document Moved
Object MovedThis document may be found here

how can i solve this and what should i look into for this issue.

21 09 2015
Diana Rozo

Good day

I have a question, I have an error in a workflow that I configured, Vendor invoice lines type, the messages of the errores are this

Stopped (error): X++ Exception: Cannot save the workflow because affinity does not match. at SysWorkflow-save SysWorkflowQueue-resume

Stopped (error): X++ Exception: Cannot save the workflow because it is not locked. at SysWorkflow-save SysWorkflowQueue-resume

What could be?

22 09 2015
santoshsurtintosh

Hi,

We are going to start Travel and Expense system, my question is when I create and submit expense report. Workflow attached to the system does not start automatically unless we manually go to AOT and start Form Tutorial_WorkflowProcessor. It is very tedious to start this form as soon as workflow request send.

Is there any option so that system can execute this form as soon as new request submitted.

Thanks.

17 12 2015
Per Jakobsen

is there a way to submit a approval workflow to a person selected by a user dialog

3 02 2016
Lori

I have a situation where AP puts in invoices near month end and while the approval(s) are being completed we start a new month. When the approvals are completed and the system tries to post it fails with this error. Stopped (error): Posting of order P-XXXXX canceled The fiscal period is closed for module Purchase order on the date 1/26/2016 The fiscal period is closed for module Purchase order on the date 1/25/2016

How can I setup the workflow to not stop?

8 02 2016
Per Jakobsen

Workflow setup/Programming

Have anyone done some code where it is possible to transfer the message a user enters, when a workflow get’s submitted into the delegates notifications, or email message

8 02 2016
Jonathan

Hi.

Its fairly easily, can even be done without coding in certain circumstances

1. Add a parm method to your workflow document class that returns the latest comment. (see https://community.dynamics.com/ax/b/technicaltutorialsformsdynamicsax2012/archive/2015/05/14/query-to-get-workflow-last-comment-in-ax-2012 for how to get last comment) 2. In your workflow instructions in your workflow configuration, make sure to add this as a dynamic field some where e.g. %purchReq.LastWorkflowComment% 3. In your email template ensure that you include the %message% placeholder to should the instruction

On Mon, Feb 8, 2016 at 1:57 PM, Dynamics AX Workflow Wanderings wrote:

>

8 02 2016
Jonathan

You don’t need to customise the form, you simply need to select the dynamic field you just created in #1 in your instructions.

8 02 2016
Per Jakobsen

Thank you jonathan, This was very very usefull to me

3 03 2016
Tarren Gomes

Hi Jonathan,

This is one of my favourite blogs for workflow related stuff. Always useful.

This time am getting a weird scenario during workflow processing where workflow is activated after submission in the view history, but it never moves further. I have done all the know setups such as batch group setup. assigned the server for the batch groups which is checked as batch server.

After all this still my workflow does not proceed further with approval process . Can you give me some inputs on this about what i may be missing.

Thanks in advance.

Regards,
Tarren.

5 03 2016
Lori

Jonathan,

I am on AX 2012 R3 CU8 and I have several questions regarding my purchase requisition workflow. First let me say that I only have 2 elements included: review purchase requisition and approve requisition. In the approval step I use managerial hierarchy starting at the requester and all users are retrieved. The expectation is that all the managers approve until the manager has a signing limit greater than the purchase. Then if the approver doesn’t complete within a time limit it escalates up the hierarchy. This works but with some issues.
1.) When the approval reaches the CFO and he doesn’t approve within time limit it stops with error because he doesn’t have a report to in his position. How can I avoid?
2.) When sending notification emails the manager wants to see some data from custom fields. How can I create text placeholders?
3.) When the manager get the notification they want to know who approved it prior. How can I include?

Outside of workflow the approvers want to know how to see history of what they have approved and what their staff has approved. Is there a report or inquiry screen?

Thanks!

30 03 2016
Abhishek

I am not able to see action button from where i can approve the request
although the same is visible when i hit control + s key
this is a custom workflow

28 05 2016
aijazmahar

Hello,

My customer requirement is that they required “on hold” option in between Reject and approval . Is this possible in AX2012 ?

13 06 2016
Alex Pullens

Hi, I am wandering…I have an issue that once a workitem that has been connected to multiple approvers (with single approval requirement).

If one of the approvers delegate the workitem to someone outside the approval group, the workitem remains open for the initial approvers.

Do you have a solution for this?

13 06 2016
Jonathan

Hi Alex

What is the the desired result?

13 06 2016
Alex Pullens

The disered result is that the workitems should be closed directly for the initial approvers, if it has been delegated to someone else.

13 06 2016
Jonathan

Hi Alex. Unfortunately that goes against what AX is designed to do. Delegation is against one work item not all. However I have done this type of functionality before. You have 2 options 1. You can use a Task Based approval that forces the user to first “Accept” his workitem which removes it out of the other users inboxes, he can then safely delegate. 2. You can write code to auto-complete (reject or approve) the workitems of all other users on delegation.

On Mon, Jun 13, 2016 at 10:54 AM, Dynamics AX Workflow Wanderings wrote:

>

14 08 2016
Tamana

hi, I have a task to complete it in ms dynamics ax 2012 the task is like this:
when an employee applies for a leave request and the approval of the leave is pending for one week the system should automatically send email notification to person who approves the leave request but the task is pending to him/ her.

please help how to do this ?

26 12 2016
vianphong

Hi Jonathan,

I have a question, hope you help. in Travel and Expense module, i create a Expense line item report workflow. I have requirement of auto delegate the workflow to particular user if it has not been approved by the user to which the workflow has been assigned within the given time period. And that user is corresponding to each expense item line. The standard escalation feature can’t accomplish this.
please help me ?

13 02 2017
Per Jakobsen

WORKFLOW AX 2009

I remember there were someone whom shared a complete development project for AX 2009 containing elements for a approval workflow in AX 2009.
where you just had to rename the elements and now you had a complete approval workflow.

Does anyone have the link to where I could retrieve this project

thanks in advance

Per Jakobsen

14 02 2017
Frank Huster

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: