An unexpected error has occurred while opening the workflow. See the event log on the AOS and contact your system administrator to resolve the issue.

发布时间 2024-01-08 22:08:14作者: lingdanglfw
\Forms\WorkflowEditorHost\Methods\build
 
private void build()
....
    System.Exception            interopException;
 
 ............
    else
 
    {
        try
        {
            workflowConfiguration = Microsoft.Dynamics.AX.Framework.Workflow.Model.WorkflowModel::Create(versionTable.ConfigurationId, curext(), domainUser);
        }
        catch (Exception::CLRError)
        {
            interopException = CLRInterop::getLastException();
            while (!CLRInterop::isNull(interopException.get_InnerException()))
            {
                interopException = interopException.get_InnerException();
            }
 
            error(strFmt("%1", CLRInterop::getAnyTypeForObject(interopException.get_Message())));
            throw error("@SYS327400");
        }
    }
 

}
 
}
 
After editing workflow configuration, now the inner exception was somewhat:
 
Could not find endpoint element with name 'NetTcpBinding_SysWorkflowConfigurationService' and contract 'Microsoft.Dynamics.AX.Framework.Services.Client.AxClient.SysWorkflowConfigurationService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.
 
This was obviously related with SysWorkflowConfigurationService which is linked with AxClient Service Group, and manual deployment was not successful due to underlying issue of CIL mess up or mismatching IL assemblies in DB vs files. This was also true on checking AX Client configuration *.axc file which should have an entry as below. Contrary to that it was not found even after freshly generated WCF without such entry as AXClient SysOperation service group was not successfully deployed:
 
<endpoint address="net.tcp://[aoserver]:8201/DynamicsAx/Services/AxClient" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_SysWorkflowConfigurationService" contract="Microsoft.Dynamics.AX.Framework.Services.Client.AxClient.SysWorkflowConfigurationService" name="NetTcpBinding_SysWorkflowConfigurationService">
 
To resolve the above issues, one should follow the below sequence:
 
1. Compile Natively without any errors.
 
2. Truncate the SYSXPPASSEMBLY table in model DB and remove everything in XPPIL (path: C:\Program Files\Microsoft Dynamics AX\60\Server\[AOS-Instance-Name]\bin\XppIL).
 
3. Compile CIL fully to generate new assemblies.
 
4. This would automatically deploy AXClient service group. If not, you should try manually deploying the same from AOT.
 
5. Finally, generate fresh WCF and generate a fresh client configuration file, to open AX Client. Also, check the above mentioned end point entry if it was generated which also means AXClient Service Group successfully deployed.
 
Finally the above mentioned issue in workflow should be resolved, if the batch jobs for workflow are running without issues. Also, workflow configuration form should be opened without any issues if the issue was resolved.