Production : Routing a File

Hi All,
      I need to route a file based on its type in Ensemble Production. But I don't want to write a Business Process code to achieve this. Am using FilePassThroughService to get a file.
     There are two FilePassthrough operations for different type of files. Is there anyway to achieve this using Business Process Rule itself?
      Also how to get the filename in Business Process Rule that comes from FilePassThroughService?

 

    Thanks in advance.

Answers

You can use a Message Router as your Business Process.

In the Routing Rule you can define the Message Class in the Rule's constraint to be Ens.StreamContainer, which is the default message type for file passthrough.

Then you can use the OriginalFilename property of the message to check regarding the extension of the file, for example.

Here's a sample screenshot to illustrate -

Hope this helps.

When I do this I get the error and the pdf file is written but corrupt in my file drop location.

Any ideas why? or what I am doing wrong. I have it set up as shown above.

 

ERROR <Ens>ErrGeneral: No Stream contained in StreamContainer Request