When we deploy a document from a lower environment to a higher environment, its ID is getting changed. Due to this, constant points to invalid/wrong a document.
We are using direct deployment (Compare & Deploy)
Is it expected behavior?
Discussion posts and replies are publicly visible
Yogi Patel This is expected behaviour to maintain environment isolation and prevent conflicts.I would recommend you put that document into a constant and use that constant.
Yes, replaced the document ID with a document in constant.
Thanks for your reply.
rule of thumb, IDs changes from one environment to another environment. UUID remain same across environment.
Constants (of "document" type) which point to a specific document, should still point to the correct document after deployment to another environment, regardless of the fact that the deployed copy of the document will have a new/different underlying DocId. If you're seeing something other than this, then you might need to open a support case with Appian Support.
That constant, is that a number? If yes, change it to the type "Document". It will then reference the UUID and become stable across deployments.
It should work when you have the document object in document type constant.
Yes, this is the expected behavior... Because the document instance is different in the new environment. Reference the document instead of its ID and it will work.