Blessed Geek
Blessed Geek

Reputation: 21664

TIBCO BW: Read Resource file using "Read File" or "Parse Data" activities

I have a txt file inside the resource folder of my BW project.

I have need to read that file using "Read File" or "Parse Data" activities.

These activities require me to specify the location of the file.

  1. What is the location of the resource file, that I could use as the file spec of "Read File" or "Parse Data" activities?

    Let's say my txt file is /Resources/Policy.txt, in my BW project.

  2. If my project is UTF-8 enconding, would the encoding of that file also be UTF-8?

Upvotes: 1

Views: 2791

Answers (1)

jens walter
jens walter

Reputation: 14029

You can read the content of the file with the "retrieve resource" activity. If you put in your relative project path "/Resources/Policy.txt", it gives you back the content of the file (base64 encoded). With that you can decode the content and work from that point onwards.

regarding 1) use "retrieve resources" instead of "read file" and you should be fine.

regarding 2) the project encoding should have no influence of the encoding of you text file. You have to manage the encoding on you own and implement it through the base64 decode after retrieving the content.

Upvotes: 1

Related Questions