Ivan Yurchenko
Ivan Yurchenko

Reputation: 29

BizTalk 2016 orchestration

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?

Upvotes: 0

Views: 46

Answers (1)

Dijkgraaf
Dijkgraaf

Reputation: 11527

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

Upvotes: 1

Related Questions