Workflow Escalation: The iterator does not designate a valid element

12 04 2010

Today I came across an interesting scenario within Dynamics AX workflow as a result of a forum user’s question. When one sets up a workflow to escalate using a role based model to ‘Work item owner’ the workitem will fail when the due date arrives with a stop error of ‘The iterator does not designate a valid element’.

Logically what is happening is that workflow is trying to escalate the workitem back to the person who is currently assigned to the workitem (I’m not sure whether this is desired behaviour or not). The internal code in SysWorkflowEventDispatcher seems to not allow for the ‘Work item owner’ option to ever be resolved properly. unfortunately there doesn’t appear to any fix as yet to this issue.  Hypothetically speaking one of the following should happen:

1) The workflow configuration form should not allow for the option to select: escalate to Work Item Owner or
2) The code should allow for workitems to be escalated to the workitem owner (not recommended) or
3) A valid error message should be provided.

Choose an alternate way of escalating your workitems.

I hope this helps.

P.S. You can choose to escalate to the ‘Workflow Owner’ and it will resolve correctly even if the currently assigned user is the workflow owner.




Leave a Reply

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

You are commenting using your 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: