AEM Form perform background validations?

Avatar

Avatar

AmiAdobe

Avatar

AmiAdobe

AmiAdobe

02-12-2020

Hello everyone,

 

i'm working on a sort of PDF form validation.

We have some PDF that needs to be validated and tested automatically. These PDF are provided with internal javascript that simple test PDF fields input and returns the results in a hidden page of the PDF itself.

The PDF are automaticallty filled using an xml containing the field values. This is done using a service created in Adobe AEM Forms, through the Workbench.

The service merges the XDP file with the XML file producing a filled PDF.

My question is:

If i fill the PDF that way, it's possible to fires up the PDF internal javascript in order to perform the PDF validation and produces the log? I would like to do this automatically, without opening the PDF.

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

Mayank_Gandhi

Employee

Avatar

Mayank_Gandhi

Employee

Mayank_Gandhi
Employee

02-12-2020

@AmiAdobe  Use case looks fine to me but what do you mean when u say "produces the log"?

Long story short... By saying "produces the log" i mean the validation results. Assuming i have i field named "age", that should accept integer only values, but the users fills the field with the string value such "hello".... The validation result should report some kind of log telling me: "the user have entered "hello" for the field name "age". Since the fields have some javascript attached and performs validation, when the pdf are filled (with an automated process) i need to read the result of this validation. I thought at first to send the log to the PDF itself by populating hidden fields and then save the PDF or send the result via HTTP using a submit button. At the moment i'm using the docReady event to raise or launch the validation process and sending the results to the hidden field mentioned earlier, but i need to open the PDF to do this. I wonder if this process could work automatically using an AEM process. The files (both an xdp and an xml) are sent to the input folder of the process. The process fill in the the document and produces a PDF in the output folder of the process. At this moment the inner events that generate the log could be fired automatically and without opening the PDF? Or... it is possible to send the log in some way without open the PDF?

@AmiAdobe I doubt we have something that can help with this testing out of the box.
@AmiAdobe if you have the workbench, I think writing in a field in a hidden field make much more sense. Let the render form service merge the data and hidden field and you can trace the data later
Manged to execute an event main document docReady that write to a text field. This works when we pass the document to the input folder
Manged to execute an event ib the document docReady that write into a textfield. When we pass the document to the input folder of our process, the event fires and write some text in a textfield and This happens without opening the pdf, so the event is executed in "background" at server side. Btw, we cannot manage to call a function (in docReady) that perform validation and fill a textfield on server side. The function works if we open the PDF, but doesn't work if we use the process we defined.