18 Replies Latest reply on Jul 24, 2008 2:25 AM by (Sunaif_Aziz)

    Simple flow with a Digital Signature

    Level 1
      Hi,
      I have a a dynamic PDF document which includes a document signature on it. The flow begins with starting the process which has task manager end point. The starter of the process fills the form and sign the document and commits. Then another user login to workspace and open the To Do list and see the filled form. However digital signature is not preserved, missing. I have defined my pdf form as xfaForm.
      How can I create a flow preserving the digital signature?

      Thanks,
      Asiye
        • 1. Re: Simple flow with a Digital Signature
          Jasmin Charbonneau Level 4
          You need to make sure the submit button submits the whole PDF and not just the data. If you submit just the data, then render service will regenerate the PDF but the signature will be invalidated since the document is recreated.

          If you submit the whole PDF, then the signature will be maintained. Use Adobe Form Designer and look at the properties of the submit button to make sure you submit the right content.

          Also you'll need to use a Document Form variable and not a xfaForm variable because the xfaForm variable can only contain XML. Use that Document Form variable in the Form Data Mapping of the user step that needs to see the PDF with the signature.

          Jasmin
          • 2. Re: Simple flow with a Digital Signature
            Level 1
            Hi Jasmin,
            I have created a Document Form variable "myDocForm" and select my xx.pdf document as URL. My form includes "process fields" objects.
            1. First step of my process is "Set Value", it has mappings to take the values of fields in my form. How can I extract the the values from Document Form?
            2. Second step is a user task, who will only view the form which is digitally signed and give decision as approve or not. In the form data mappings of this task, what will be the input form variable and output form data.
            3. Third step is a "Set Value" which makes mapping of another form from myDocForm, then create new form myDocForm2 with filled areas. I also want my old form to be as an attachment to my new form. How can I do that?
            4. Fourth step is user task to open the myDocForm2 and sign form and submit. Can also see the attachments.

            As a question, which variables and types have to be defined for this process?
            In my trying, when I use Document Form variable as input form variable in the 2nd step, while I tried to open the form, progress bar become visible and trying to open the form but can not succeed. Can I send you an email of my process or you can mail me your contact details?
            asiye.aydin@gmail.com

            Thanks A lot Jasmin.
            Asiye
            • 3. Re: Simple flow with a Digital Signature
              Jasmin Charbonneau Level 4
              1.How can I extract the the values from Document Form?

              The "Document Form" variable contains the PDF in the property called document. The xPath to get to it is /process_data/myDocForm/object/@document. You can save the content of that property in a "document" variable (not "Document Form").

              Now you can use the Form DataIntegation service under Common to export the data from the PDF. The exportData take a "document" as an input parameter. You can use the content from /process_data/myDocForm/object/@document.

              2. The user step need a "Document Form" in the "Form Data Mapping" section. Just use the "myDocForm" for the input and output parameter.

              3. You can create a variable of type "List" and sub-type "document". You can put the "document" from the "Document Form" variable (using /process_data/myDocForm/object/@document) in the List and pass the list in the "Attachment and Notes" parameter of the User step.

              4. Make sure to use myDocForm2 (Document Form) for Input and Output of your "Form Data Mapping" for the second user.

              Jasmin
              • 4. Re: Simple flow with a Digital Signature
                Level 1
                As a first step I put exportData operation whcih I give myDocForm/object/@document as input pdf document, a new mydocument (type document) as an output variable. And a second step userTask which gets myDocForm as input and output.
                However I got the exception:
                Caused by: com.adobe.livecycle.formdataintegration.client.ExportFormDataException: Operation aborted: malformed PDF or data.
                at com.adobe.livecycle.formdataintegration.server.FormData.exportData(FormData.java:139)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:585)
                at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:181)
                ... 87 more

                Why my pdf is malformed? It is a dynamic PDF form with digital signature on it with process variables included.
                Thanks,

                Asiye
                • 5. Re: Simple flow with a Digital Signature
                  Jasmin Charbonneau Level 4
                  Are you sure the submit button on the form submit PDF. I bet you it submits XML. If that's the case the exportData won't know what to do with XML because it expects a PDF.

                  Use the Adobe Form Designer, and check the submit button's property and make sure it submits PDF.

                  Jasmin
                  • 6. Re: Simple flow with a Digital Signature
                    Level 1
                    I drag and drop Process Variables to form. Look at the submit button, it has javascipt on the click event. It had a place which submits XDP, I have changed it to PDF. Is it what have to be changed or sth else do I have to change?
                    Thanks a lot,

                    Asiye
                    • 7. Re: Simple flow with a Digital Signature
                      Jasmin Charbonneau Level 4
                      Did that work? You need to change it from the button properties. Not in the code.

                      Jasmin
                      • 8. Re: Simple flow with a Digital Signature
                        Level 1
                        When I drag and drop process variables into form It puts a Regular Submit button which has a script on click event. This is the script:

                        if (xfa.host.name == "Acrobat")
                        {
                        // get the local URL of the PDF, to check to see if it's a file on disk or from the web.
                        var sURL = event.target.URL;
                        if (sURL == null) sURL = "";

                        // can only email if there is a LiveCycle email address and doc loaded from disk (not in a browser)
                        if ((sURL.indexOf("file://") == 0) )
                        {
                        if (AWS_STATUS.rawValue == "Submitted"){
                        app.alert("This task item has already been submitted.");
                        bSubmit = false;
                        }
                        else {
                        // set this boolean to false if any of the criteria fails
                        var bEmail = true;

                        // check for empty agent email address
                        var _mailTo = AWS_MAILTO.rawValue;
                        if (_mailTo == null) _mailTo="";
                        if (_mailTo == ""){

                        // prompt for an email address to send the submit
                        AWS_MAILTO.rawValue = app.response("This form does not contain the email address for a LiveCycle service. Please enter the LiveCycle email address now.", "Task Item Submission Information");
                        if (AWS_MAILTO.rawValue == ""){
                        bEmail = false;
                        }
                        }

                        // check for either a taskId or process type, if no taskId, prompt for Process Type
                        if (bEmail){
                        var _taskId = AWS_TASKID.rawValue;
                        if (_taskId == null) _taskId = "";
                        var _processType = AWS_PROCESSTYPE.rawValue;
                        if (_processType == null) _processType = "";

                        if ( (_taskId == "") && (_processType == "") ){
                        // prompt for process type
                        AWS_PROCESSTYPE.rawValue = app.response("This form does not contain a taskId or a process type. Please enter the Process Type you wish to invoke with this form.", "Task Item Submission Information");
                        if (AWS_PROCESSTYPE.rawValue == ""){
                        bEmail = false;
                        }
                        }

                        }

                        if (bEmail){
                        event.target.submitForm({cURL: "mailto:"+AWS_MAILTO.rawValue,
                        bEmpty: true, // Post all fields (true), or do Not post all fields (false)
                        cSubmitAs: "XDP", // Post XDP format
                        cCharset: "utf-8"});
                        // set status to "Submitted" so that another send is not attempted via email.
                        AWS_STATUS.rawValue = "Submitted";
                        }
                        }
                        }
                        else{
                        // normal web acrobat submit
                        FSSUBMIT_.execEvent("click");
                        }
                        }
                        else // other web rendering submit
                        {
                        FSSUBMIT_.execEvent("click");
                        }

                        Have to I use a "Submit" type submit button instead? What will be the submit options then?
                        • 9. Re: Simple flow with a Digital Signature
                          Jasmin Charbonneau Level 4
                          This regular button calls a hidden button called FSSUBMIT_. It's one of other hidden field underneath that regular button. It might be easier to find it using the Hierarchy instead.

                          Once you found it, make sure it submits PDF.

                          The other thing you can do is remove all of AWS* fields. The only thing you really need is a submit button for the PDF to work. You don't need these other fields.

                          Jasmin
                          • 10. Re: Simple flow with a Digital Signature
                            Hi,Jasmin

                            I have the same problem.

                            I try to choose "PDF" instead of "XML Data Package (XDP)" in FSSUBMIT_ field Submit options,and remove other all of AWS* fields.

                            But when I try to complete the form in workspace, I get "An error occurred submitting the form (task XXX, form {XXX}). (ALC-WKS-007-043)".

                            Do you know why error ALC-WKS-007-043 can occur after submitting form in Workspace?
                            • 11. Re: Simple flow with a Digital Signature
                              Jasmin Charbonneau Level 4
                              Can you just delete all the AWS field sand the submit button and the hidden submit button.

                              Then drop a new button, make it a submit button and make sure it submits PDF.

                              I think your form is all messed up now.

                              Jasmin
                              • 12. Re: Simple flow with a Digital Signature
                                Level 1
                                Hi,Jasmin
                                In my process,it is a casual and ordinary dynamic form which has only document signature field and process field.

                                I try to delete all the process field including submit button and the hidden submit button,then I drop a new button to make it into "submits PDF".But when I try to complete the form in workspace. I get the message "An error occurred submitting the form (task XXX, form {XXX}). (ALC-WKS-007-043)"again.

                                Is this form or the flow make a mistake?
                                Can you provide a form sample for me?

                                Thanks a lot.
                                • 13. Re: Simple flow with a Digital Signature
                                  Jasmin Charbonneau Level 4
                                  On the submit button set the URL to go to http://localhost:8080/workspace-server/submit

                                  Jasmin
                                  • 14. Re: Simple flow with a Digital Signature
                                    Level 1
                                    Hi,Jasmin
                                    I set the URL to go to http://hostname:8080/workspace-server/submit on the submit button in my form.User can sign and submit the form in Workspace ,but I get no any message and the task not send to next user.

                                    What can I do?
                                    • 15. Re: Simple flow with a Digital Signature
                                      Jasmin Charbonneau Level 4
                                      Is the name of your server "hostname"? Make sure to put a valid server name in there.

                                      Jasmin
                                      • 16. Re: Simple flow with a Digital Signature
                                        Level 1
                                        My server name is "lces-vm-test" .
                                        So,I set the URL to go to "http://lces-vm-test:8080/workspace-server/submit" on the submit button in my form.
                                        it can sign and submit,but I get no any message(return a blank page)and the task not send to next user.
                                        • 17. Re: Simple flow with a Digital Signature
                                          Level 1
                                          In my process,
                                          1.I have created a Document Form variable "InitForm" and select my "xx.pdf" document as URL and choose "Required""input""output"three options in Gereral properties.
                                          2.In user step, I use the "InitForm" for the input and output parameter.
                                          • 18. Re: Simple flow with a Digital Signature
                                            what if we have two routes and we want to define a link of both routes in our pdf?
                                            One of the link can be http://server:8080/workspace-server/submit to submit or accept the form, what about other route?