views:

255

answers:

2

I am developing a process that will read and send an image in an e-mail. This image is a folder within this process.

The problem is: how do I get the path where the process is running?

Something like a 'Server.MapPath' that returns the image path in the File System.

Thanks in advance.

A: 

If your images exist in a folder in your BW-project you can use the 'Retrieve Resource' activity to get to the content.

You just have to set the resourcePath with the relative Path in your project and it will output the base64 data.

smartypants
A: 

SOAP RetrieveResources could be a good solution, but throws a NullPointerException for me on BW 5.4. Maybe it is a bug in this version.
The problem regarding getting a 'root path' is that a deployed BW project does not keep its original folder/file structure - the deployer will not 'explode' the EAR file. Therefore you won't find the image as a separate file on the BW server box.
There is a simple way to dynamically load XML files, by using the following XPath statement:

tib:render-xml(document('tibcr://path/to/file.xml'))

but it will obviously fail on binary files. My best guess for storing binary data inside a BW project would be to store it as a string constant in Base64 or Hex format.

Miklos