BizTalk 2016 orchestration

39 Views Asked by At

I need to recognize a file type and make a decision in a decision shape according to a file type.

I will receive 2 types of file: csv and JPG. So if it is CSV - send here, if JPG - send another way. So my question is how to recognize file type in decision shape in a orchestration?

1

There are 1 best solutions below

0
Dijkgraaf On BEST ANSWER

You can get the filename from the context property called BTS.ReceivedFileName on the message.

FileName = InputMessage(BTS.ReceivedFileName);

Then you will probably need to make a call to a C# method Path.GetExtension

extension = Path.GetExtension(FileName);

Then you can have a decision shape based on the extension