Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Workbench
Viewing all articles
Browse latest Browse all 69588

I want to read the content of a text file dropped in a watched folder into a string variable

$
0
0

I have a workbench process with 2 variable.

inDoc (DataType=Document/input/required)

outStr (DataType = String/output)


The document being passed to the workflow is a text file with 4 lines of text in it.  when the text file is dropped into the watched folder, it will be assigned to the inDoc parameter in the workflow.

My workflow needs to extract the 4 lines of text and write it into a string (outStr).

 

Id like to use the FileUtilsService.ReadString service but i can't since its input parameter is the file path.  When i do, i get the following error...

 

Caused by: ALC-FUT-001-011: File rO0ABXNyABZjb20uYWRvYmUuaWRwLkRvY3VtZW50yAEFUxsO+CEDACNJAAtfY2FsbGJhY 2tJZFoADV9kZXNlcmlhbGl6ZWRJABBfZGlzcG9zYWxUaW1lb3V0WgAJX2Rpc3Bvc2VkWgA ZX2lzRGlzcG9zYWxUaW1lb3V0RGVmYXVsdFoAE19pc1RyYW5zYWN0aW9uQm91bmRKAAdfb GVuZ3RoSQAOX21heElubGluZVNpemVaAAhfb3duRmlsZVoAC19wYXNzaXZhdGVkWgALX3B lcnNpc3RlbnRJABFfc2VuZGVyQ2FsbGJhY2tJZFoAEV9zZW5kZXJQYXNzaXZhdGVkWgARX 3NlbmRlclBlcnNpc3RlbnRJAA5fc2VuZGVyVmVyc2lvbkkABl9zdGF0ZUwAC19hdHRyaWJ 1dGVzdAATTGphdmEvdXRpbC9IYXNoTWFwO0wACF9jYWNoZUlkdAAfTGNvbS9hZG9iZS9pZ HAvRG9jdW1lbnRDYWNoZUlEO0wADF9jYWxsYmFja1JlZnQAIUxjb20vYWRvYmUvaWRwL0l Eb2N1bWVudENhbGxiYWNrO0wADF9jb250ZW50VHlwZXQAEkxqYXZhL2xhbmcvU3RyaW5nO 0wAC19kYXRhQnVmZmVydAAeTGNvbS9hZG9iZS9zZXJ2aWNlL0RhdGFCdWZmZXI7TAAPX2V 4cGlyYXRpb25UaW1ldAAQTGphdmEvbGFuZy9Mb25nO0wABV9maWxldAA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MjU3XzAxLTIwMTFfM3x OfHx8fHx8fHx8fDIwMDB8Nnx8fGFzZGZ8YXNkZnxhc2RmfDI1Nnx8fHx8fHx8fHx8fHx8f Hx8fHx8DQpJTU01MjU3XzAxLTIwMTFfNHxOfE58fE58TnxOfHxOfE58fE58TnxOfA0KSU1 NNTI1N18wMS0yMDExXzV8U2luZ2xlfDAxfHwyMDEyfDAyfDE4fDIwMTJ8MDN8MDN8MjM0f GFzZGZ8fGFzZGZhc3x8fHxFeGNoYW5nZS1Qcm8uOS40MDEuRnVsbC5XSU4uZW5fQ0EuRU5 VLTEwLTIwMTF8DQoNCnBwdwYAAAAAAAB0AAp0ZXh0L3BsYWlucHNyABFqYXZhLnV0aWwuS GFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx 3CAAAABAAAAADdAAKd3NmaWxlbmFtZXQAJ0M6XFVzZXJzXENodWxseS5QYXJrXERlc2t0b 3BcaGRzY2FuLnR4dHQACGJhc2VuYW1ldAAKaGRzY2FuLnR4dHQABGZpbGVxAH4AFXh3NwA tYWRvYmUvaWRwL0RvY3VtZW50UHVsbFNlcnZhbnQvYWRvYmVqYl9MQ19ERVYx///////// /94 does not exist.

at com.adobe.livecycle.fileutils.FileUtilsService.readDocument(FileUtils Service.java:363)

 

which is what i expected...

 

 

I've also tried with the Script.executeScript to call some java code but im not too strong in java and in all the examples i find, the file pointer requires a file path.

 

import java.io.*;

FileInputStream f = new FileInputStream(patExecContext.getProcessDataValue("/process_data/inDoc"));

 

OR

 

File f = new File(patExecContext.getProcessDataValue("/process_data/inDoc"));

 

OR

 

File f = patExecContext.getProcessDataValue("/process_data/inDoc");

 

 

Any clue how to resolve my problem?


Viewing all articles
Browse latest Browse all 69588

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>