web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Workflow import works in test env., not in prod env. but works in unrelated env.

(1) ShareShare
ReportReport
Posted on by 282
Hi Dynamics Community,
 
I'm running into an issue which seems like it should be a non-issue, was hoping someone might have some input here.
 
I'm importing a workflow (Workflow approval for proposed vendor change) in a test environment, then running into an error and this stack trace when trying to import it in the production environment (see below).
 
However, when importing the same workflow in a totally unrelated environment, it works fine. So it shouldn't be an issue related to users or anything such.
 
Here's the error message, which seems to be just a stack trace:
 
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Dynamics.AX.Framework.Workflow.Model.AxMilClient.save(WorkflowModel _model, Boolean _isNewModel, Boolean _isNewVersion, WorkflowConfigurationVersionType _versionType)
at Microsoft.Dynamics.AX.Framework.Workflow.Model.WorkflowModelProvider.Save(WorkflowModel model, Boolean isNewModel, Boolean isNewVersion, WorkflowConfigurationVersionType versionType)
 
I tried using import option, the check box, to import to new version if there's a version conflict, no difference.
Since the stack trace starts with WorkFlowModelProvider, I figured I'd try to see if there's any problem with the model provider. Checking the XML-file for provider, I find this match: HcmPositionHierarchyConfigurableWorkflowProvider.
Checking that class, I see this description:
"Provider class for the configurable workflow hierarchy assignment provider.
Assignment is determined by the hierarchy configured to a given workflow."
Anyway, checking the position hierarchy and position hierarchy types, they are empty in both test and prod environments, that I can see.
 
Categories:
I have the same question (0)
  • Layan Jwei Profile Picture
    8,212 Super User 2026 Season 1 on at

    Hi Dan,

    I didn't get this error before but trying to help and think why, Is the code in PROD the same as in the other environments?

    Perhaps the workflow is referencing something that doesn't exist in PROD yet. For example, maybe it could be using a field that hasn't been deployed there.

    Could you also try creating the workflow from scratch in PROD? Is it a large workflow, or would it be relatively quick to rebuild? to see whether a particular step or configuration triggers the issue.

  • Suggested answer
    Giorgio Bonacorsi Profile Picture
    3,409 on at
    Hello,

    My suggestion is to open the workflow in the test environment and check which configuration is applied for the approval (hierarchy, user group, etc.).
    Then, in production, verify that the same configurations are present. The error likely occurs because the configuration in prod differs from test. When importing, D365FO tries to replace the connector but cannot find the required elements.

    Thank you,
    Giorgio
  • Abhilash Warrier Profile Picture
    8,567 Super User 2026 Season 1 on at
    Hi Dan,
     
    Have you tried creating the workflow manually in the PRE-PROD or Production environment to troubleshoot the issue instead of importing the WF?
     
    Please review the below option as well -
    -> Validate workflow file, delete existing Workflow and try importing. Remember to take a backup since you are trying in PROD.  
    -> Verify all security roles exist
    -> Validate workflow participants (user, role, hierarchy)
    -> Check workflow configuration (steps, conditions, rules)
    -> Compare environment setup (legal entity, dimensions, parameters)
    -> Verify user permissions (workflow admin access)
     
    Regards,
    Abhilash

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 635 Super User 2026 Season 1

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 635 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 547

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans