Is it possible to retrieve forms content from with a script activity in workflow?
Question
Question
Answer
I hate when I find a thread with no answer.
I decided option 2 above was the one that met the most of my criteria. I need something robust, and I want to keep as much of the automation within the workflow application as possible. Maintaining the workflow shouldn't require a programmer.
I have a database that both the laserfiche application and workflow can read and write to for these types of workflows. I had IT allow read access to the forms DB and created a view in the workflow/laserfiche DB which has the submission ID, the variable names and the values.
Using the standard workflow tools I can now retrieve the submission ID and us the query data activity to retrieve the Laserfiche Forms content in a format that's easier to manipulate in my workflow.
Replies
Workflow's use case is for when the user wants to use form data in business processes. It also expected that different forms would need different workflow processes. Since there would be a user involved in designing these processes, the tokens are generated by variable name rather than ID.
Forms does not actually delete the submission data when a business process is deleted. It may not still be accessible through the user interface, but it still there. So you could write a web page against the Forms tables to show the questions and answers you mentioned above.
If you do want to move the data to a different table, then it would be easier to just use a scheduled task in SQL that imports the data directly from the Forms backend into your table. It would be more efficient since you would be able to specify the query and you wouldn't have Workflow in the middle.
Hey Kelsey,
I suppose I should be clear. I didn't find an answer to my original question, I just discovered in the course of investigating that question that my approach was wrong and sought a different means to the end I needed to achieve.
I've selected the most appropriate post.
Cheers!
Matt
I believe you should be able to do it with Query Data activities. You will want to use stored procedures if you can for this though. Why would you want to not use the built in functionality with the "Retrieve Forms Content" activity?
I'm trying to see if I can design a workflow that can process the inputs from many forms. If we standardize the variable names we could then iterate through the input from any form and write to a table something along the lines of
instance_id variable_id form_data
If we store the form questions in another table along with the variable IDs we've can capture all of the data from a form in a database.
variable_id form_question
That way when the form design team brings a new form online we don't have to write either a new workflow nor a new data structure to capture it, all of the form outputs go to a single database. We just have to add a new starting rule to the workflow that monitors the target folder of the new form. It also helps future proof the system, with both the questions and answers stored in the database anyone can interpret the results from the form even if the original form is no longer available.
What I really want is a workflow activity that says "retrieve form values" where I can follow that with a for each value activity. In the absence of this feature my options appear to be:
- write a script that calls the data from the form and writes to a database
- bypass the Retrieve Forms activity entirely and use the instance ID to retrieve the data from the forms database directly for reprocessing
- write a workflow for each form
At this point I'm still in the system design phase and I'm trying to determine which approach will be the most robust, which hopefully doesn't actively require a programmer to maintain.
Hi Matt,
If your question has been answered, please let us know by clicking the "This answered my question" button on the appropriate response, whether that is your own post or a different one.
If you still need assistance with this matter, just update this thread. Thanks!