Is it possible to determine which kind of document (XML, Flat File, etc) arrives to a shape and depending on it use different mappings?
There is no official "route by profile" option.
It would be great is there was though, as we have used a number of different ways to accomplish the same basic task.
You can use a route shape with wildcards to look at the file extension or the file name, then pass the file down the correct path.
However, if you're looking at getting more granular than that, then it gets a little more tricky.
What's your use case for this? Just pulling in a directory from disk/FTP?
I have developed a generic subprocess that is called by a web service or a scheduled process?
Scheduled process read a file in a folder with a flat file profile and web service send a XML profile.
Both WS and scheduled process set a property which a value that it is used for a determined mapping (XML profile or Flat File profile).
The idea is to substitute this in case i can determine profile passed in the subprocess.
I agree with Ted probably the best (cleanest) method to do this is to have a route step and based upon the extension go down the correct path.
I have done it with process properties instead of wildcards.
We receive data in a csv file or using a web service in XML. In a future it is possible that we use XML files.
As far as i have understood we have only workarounds, there is no way to determine the kind of a profile.
Why not setup 2 WS endpoints depending on file format? Then use the same sub-process
You could always add it to the ideas board (if you have not done it already).
Retrieving data ...