How to Invoke LiveCycle Forms from an Existing XDP Form in Acrobat/Reader or Browser Plugin and Get Another Form Rendered Back to the Client
Lately I have had a request from a customer of mine who wanted to modify existing XDP forms (ie. change a label or a field value) on the fly without going in LiveCycle Designer (ie. the procedure would imply costs for hiring the dev department).
His idea was to have a Form A, in which he would be able to specify the changes he desires to have in the Form B, submit the form A to a LC orchestration which would apply the changes and render the Form B back in Acrobat/Reader or even the browser plugin.
Here I am only covering the call to LC and the rendering back to the client.
Note: I am using LCES 2 SP2 (188.8.131.52) running on Jboss.
So we have Form A that could look like this:
As we can see we have a few fields that would mean something to Form B and as an end user we will open Form A in Acrobat/ Reader or even the browser plugin to enter the value we want to see in Form B.
We need to go in LC Workbench to create an orchestration which will render Form B:
We can find the right URL for the call by selecting the Default startpoint properties:
Since I going to run the test on the same machine where Livecycle is running the URL looks like this:
Note: “test” is the name of my application and “renderForm” is my process (orchestration) and 1.0 is its version.
This is the URL I put in the submit button in Form A (see first screenshot).
In order to make the call successful, we need to create variables to match the fields in Form A: Name, FormContent and MainParagraph.
Of course, in the scenario where you want to modify Form B with Form A fields values, you would need those variables to apply the desired changes.
Note: by matching i meant the variables name and type (most of the time it would be string but you can have list as well).
Here I am only rendering the Form B without any changes so I did not bother adding more activities in my orchestration which would utilise those variables.
Once the orchestration and the forms have been saved and the application deployed on the server, all we need is to open Form A in the client of our choice, here I used Internet Explorer so we can see the URL at the top.
I click on the button “open form via REST” and the login request pops up and i use my LC credentials to access:
Once logged in Form B is appearing in the same window:
Note: When using Reader or Acrobat, it will open a new window for Form B.
No need to Reader Extend Form A to make it work hence it works in Reader standalone and plugin.
Original article at http://blogs.adobe.com/ADEP/2011/08/invoke_forms_from_xdp.html.
Comments are closed.