You are viewing limited content. For full access, please sign in.

Question

Question

Extract text from .JSON/.TXT in a workflow (File created in repositry using LF API)

asked on January 16 Show version history

Hello all,

G'day!

I have a workflow set up that triggers when an entry is posted into the LF repository using LF API (entry has a folder containing documents and associated metadata in either JSON/TXT format). The issue is that when the workflow tries to read text from the .JSON or .txt file containing the metadata, it fails with the error "the source document contained no pages. [0752-WF0].". When you import the same folder from desktop, the workflow runs fine as I’ve configured the repository to generate pages and extract text for all incoming entries and enabled the conversion of TXT/JSON files into LF pages upon import. I thought that would be the case with entries via API as well, please correct me if i am wrong.

Did anyone come across any similar concerns on the workflow? Is there anything else that i can try?

Is there a Laserfiche workflow script I can use to extract text?

Alternatively, I could use the API to update a metadata template, but I’d like to explore other options before resorting to the API.

Thanks in advance.

Bipin

 

0 0

Replies

replied on March 20

I use a workflow that will not complete until the page generation completes. You could use something similar in your workflow to ensure the text is generated before you attempt to extract it. Mine is retrieving the "Page Count" property in the "Find Entry" activity, but you'd want to retrieve the "Has Text" property and use that for your repeat condition.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.