Since you don't show the endpoint configuration, I'm going to assume that this is happening with a file inbound endpoint.
For a reason that goes beyond imagination, the file message receiver behind the inbound endpoint puts the originalFilename
property in the outbound scope when evaluating the expression to generate the archived file name.
So use: message.outboundProperties.originalFilename