Open Readable File Stream
Use the Open Readable File Stream action to read a block of bytes from a file stream.
Complete the following steps to use the Open Readable File Stream action in your workflow:
1. Click and drag the Open Readable File Stream action under the File utility to the canvas, place the pointer on the action, and then click or double-click the action. The Open Readable File Stream window opens.
2. Edit the Label, if needed. By default, the label name is the same as the action name.
3. In the File Path field, enter the path to the file that you want to read the stream from. This path must be relative to the <ThingWorx Flow Installation Directory>\modules\cache\userdata folder. Your workflow can access the files in the userdata folder only. Do not specify a relative path to access its parent directory or an absolute path to access any other folder on your local machine.
For example, if you specify the value in this field as Sample.txt, then Sample.txt must be already available in the userdata folder. If you specify the value in this field as SampleFolder\Sample.txt, then SampleFolder and Sample.txt must be already available in the userdata folder.
4. In the Encoding list, select the file encoding type.
5. In the Start (Byte) field, enter the start position (byte) from where you want to start the reading of the stream. By default, the read starts from the start of the file.
6. In the Stop (Byte) field, specify the stop position (byte) of the file where you want to stop the reading of the stream. By default, the read stops at the end of the file.
7. Click Done.
Output Schema
The Open Readable File Stream action returns an output schema as shown in the following figure: