Workflow Export Troubleshooting
Views (438)
Hello AX World,
D365FO has a possibility to export workflows enabling you to move your workflow configuration from one environment to another.
Recently I have encountered a couple of issues with it. Couple standard workflows exported perfectly except a custom one.
Message
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
AuthenticationErrorDetail
Signature did not match. String to sign used was...
The second was an unrecognized file type (e.g. Workflow name-1.0.0).
Take a look at the bad and good URLs and compare its excerpts, the problem becomes very obvious.
...bad_one-1.0.?sv=...
...good_one-2.0.0.0.xml?sv=
The second problem is caused by the same reason. It just was recognized as a file.
...bad_one-1.0.0?sv=...
What is causing this problem?
The file name is constructed using workflow's name (EDT Name 60 char.) version number and .xml file extension.
Lookup the method for details:
SysWorkflowConfigurationListPage::getExportFileName
So max length is 72 chars. I guess, you know where I am going.
After debugging, I have noticed the file name is later being passed to the method SysWorkflowConfigurationListPage::exportConfiguration which first parameter _fileName is of type Name which is 60 chars.
So the file name is truncated.
I am working in Version 8.1 PU 23. Maybe it's already been solved. I don't know that.
Be aware and take care!
D365FO has a possibility to export workflows enabling you to move your workflow configuration from one environment to another.
Recently I have encountered a couple of issues with it. Couple standard workflows exported perfectly except a custom one.
Issues
The first issue I got was an authentication error:Message
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
AuthenticationErrorDetail
Signature did not match. String to sign used was...
The second was an unrecognized file type (e.g. Workflow name-1.0.0).
Clue
The first error has nothing to do with authentication. The problem is an invalid URL being constructed.Take a look at the bad and good URLs and compare its excerpts, the problem becomes very obvious.
...bad_one-1.0.?sv=...
...good_one-2.0.0.0.xml?sv=
The second problem is caused by the same reason. It just was recognized as a file.
...bad_one-1.0.0?sv=...
What is causing this problem?
Cause
The file name is constructed using workflow's name (EDT Name 60 char.) version number and .xml file extension.
Lookup the method for details:
SysWorkflowConfigurationListPage::getExportFileName
So max length is 72 chars. I guess, you know where I am going.
After debugging, I have noticed the file name is later being passed to the method SysWorkflowConfigurationListPage::exportConfiguration which first parameter _fileName is of type Name which is 60 chars.
So the file name is truncated.
Solution
The solution is obvious, use workflow names of max 48 chars as version and file type uses at least 12 chars.I am working in Version 8.1 PU 23. Maybe it's already been solved. I don't know that.
Be aware and take care!
This was originally posted here.
*This post is locked for comments