Dynamics AX 2012 R3: Stopped Workflow Error

When working with different types of workflows in Microsoft Dynamics AX 2012, you may encounter a stopped workflow record with an error message detailing that AX ‘failed to create a session’.

AX 2012 R3 Stopped workflow error

The error message can be generated because the workflow is unable to assign the record to a user for review or approval.

To resolve this type of issue, the first step is to identify which user record is causing the issue. Because no user ID is mentioned in the error message, you can identify the user by first finding the step where the workflow stopped. In the Workflow history form, click the Tracking details tab (screenshot above) to identify the step in the Workflow activities pane which has the Workflow stopped error message.

Next, navigate to the workflow and open the workflow editor to determine if the workflow step is assigned to a user, user group, security role or hierarchy. If the step is assigned to a user, you can easily identify the user which is causing the issue. If the step is assigned to a user group, navigate to the ‘User group’ form [System administration>Common>Users>User groups] and click the Users tab for the user group to identify which users are assigned to the group. One or more of these users could be the cause of the issue. If the step is assigned to a security role, navigate to the ‘Assign users to roles’ form [System administration>Setup>Security>Assign users to roles] and select the role to identify which users are assigned to that security role. Again, it could be more than one user causing the issue. Lastly, if the assignment type is a hierarchy such as the managerial hierarchy, navigate to the Positions list page [Human resources>Common>Organization>Positions>Positions], filter on the worker who submitted the record to the workflow then pinpoint the position/worker the hierarchy would assign the record to based on the ‘Reports to’ field.

Once you have identified the user(s) the step is assigned to, verify that each user record is enabled, the user is assigned to the appropriate security roles and that the user record is associated with a worker record.

In the case I investigated recently, the approval step where the workflow stopped was assigned to a user group. One user in the group had been disabled in AX but the user was not removed from the user group. The workflow was attempting to assign the record to each user in the group. Because one user was not enabled, the workflow could not assign it to all users in the group which caused the workflow to stop at an approval step. Once the user was removed from the user group, the workflow was resumed and the record moved forward in the workflow as expected.

This post was written by Robin Ellsworth, AX Application Consultant at Tridea Partners. Tridea is a leading Microsoft Dynamics provider.

Leave a Reply

Your email address will not be published. Required fields are marked *