LiveCycle LifeLine Weblog

Entries categorized as ‘Uncategorized’

Submitting PDF to a servlet

August 13, 2009 · 10 Comments

I have written a simple servlet which writes the submitted pdf to the c drive of the server. I have written the instructions in the pdf document which can be found here
Click here to access the pdf
Download the war file
Deploy it on your server
Design your form with a submit button configured to submit “PDF” and pointing to the url
The url should be of the following format
http://:/SaveToFile/SavePdf
in my case it was http://ginger:8080/SaveToFile/SavePdf. Where ginger:8080 is my server and port no.
Save the form and hit the submit button
The form will get submitted to the servlet which writes the pdf to the c drive of the server
Let me know if you need any more help
thanks
girish

Categories: Uncategorized
Tagged: , ,

Using Namespace in Workbench

February 6, 2009 · 2 Comments

The xml returned by webservices invariably use namespaces. To access data contained in the xml you would need to declare namespace . To declare namespace you would select the process,right click the process select properties, click the advanced tab to create namespaces
For example the following is a example of namespace declared in workbench
greg http://schemas.xmlsoap.org/soap/envelope/
where greg is the namespace prefix
I have included a simple process which makes a web service call to Amazon, using namespace I get data out of the response. The following is an example of using namespace in workbench
/process_data/xmlData/greg:Envelope/greg:Body/cole:ItemLookupResponse/cole:Items/cole:Item/cole:ItemAttributes
Click here to get the PDF

Categories: Uncategorized
Tagged: ,

Accessing Process Variable Names and Values

October 6, 2008 · 5 Comments

Hi
I have written a simple component which lets you access process variable names and values for a given task. The component takes a taskID as an input parameter and return a HashMap of string which contains the process variables names and its values. Click the link below to access sample process which uses the custom component
Click to get the pdf file

Categories: Uncategorized
Tagged: ,

DATE MANIPULATION

September 26, 2008 · 12 Comments

I just finished helping a customer who wanted to add X number of days to a date entered in a text field
The following was the use case. A form has 2 TextFields Start_Date and End_date
User enters a certain date in the Start_Date text field for example 09/24/08 (MM/DD/YY)
The End_Date should add 90 days to the Start_date and populate the End_Date
The following script would do that
var current = Date2Num(Start_Date.rawValue, “MM/DD/YY”)
var future = current+90
var newDate = Num2Date(future,”MM/DD/YY”)
form1.#subform[0].End_Date.rawValue = newDate

Validating End Date is later than Start Date

var diff = Date2Num(EndingDate.rawValue, “YYYY-MM-DD”) – Date2Num(StartingDate.rawValue, “YYYY-MM-DD”)
if (diff > 0) then
xfa.host.messageBox(“The End date is later than start date”)
else
xfa.host.messageBox(“PLEASE CHECK….The End date is before the start date”)
endif
I have added the pdf here.Please click here to check it out
Date Manipulations

Categories: Uncategorized
Tagged: , , ,

Checking for Task Attachments when submitting an form

September 22, 2008 · 1 Comment

Very often there is a need to make sure the user has added an attachment to the task(Attachment added to the attachment tab).There is no out of the box way to find out if the task has attachments and prevent the user from submitting the form if there is no attachment

I have written a simple process which given a taskID would return the number of attachments associated with the task

You would then call this process from your form as a web service.The input parameter for the web service is going to be the value of the field AWS_TASKID which is part of the processfields.The return value of the webservice is stored in a hidden field.We then check to see if the value of the hidden field is “0″ which means there are no attachments associated with the task. All this logic is put in the click event of the AWS_SUBMIT button which is again part of the process fields.

I have put together a simple process which would explain to you the finer points. Click the following link to access the collateral for this process. The collateral are added as file attachments.Click the paper clip icon
Click here
let me know if you have any questions
thanks
girish

Categories: Uncategorized
Tagged: ,

Inserting Image in a XDP

September 5, 2008 · 14 Comments

A common use case is the ability to insert a image into a xdp and render the xdp into a PDF.To do this you will need to create a XSD with an image element. Then you will create a XDP using the XSD. Bind the fields of the xsd to the fields on the form.

Then you will have to merge the xml data into the xdp and render the xdp into a pdf.

I have attached a simple process which reads a xml file,extracts the image field out of the xml data, populates another xml variable with the image data and renders xdp with the data
I have included the XSD,XML file which has the image as base64 encoded string,XDP file.Click on the file attachments icon of the PDF
Click here to get the PDF
This process was built using 8.2 version. In 8.2 there are two new functions which allow you to encode a document object into a base64 string or get a document object out of a base 64 string. These are document functions

Categories: Uncategorized
Tagged: , ,

Emailing multiple persons when a task is created

August 12, 2008 · 3 Comments

Hi
Common use case is the ability to email the form to multiple persons when a task is assigned to a person.
Livecycle ES provides the capability to email the form to the task assignee. But if you want to email the form to 3 other users, you would have to write a custom component to accomplish this. Click the link below to access the process

Emailing Multiple Persons when Task is created

Categories: Uncategorized
Tagged: , ,

Passing xml data using events

July 9, 2008 · 9 Comments

Very useful feature in LiveCycle ES is the ability to associate xml data with events. This means you can bind your xml data with the events which your process throws. The process which receives these events can easily access this xml data. I have created a simple process which throws and receives events. When a event is throws you can pass the xmldata with the event. When you receive the event you easily access the xmldata elements. (To assign the event data to a process variable, make sure the process variable is marked as “input”)
Here is the link to the document which has the process collaterals. The process lca’s are attached and so is the xsd file which is used in the event message template

Click here to get the document

Categories: Uncategorized
Tagged: , ,

Deadlining a group task when a task is claimed from group queue

June 16, 2008 · Leave a Comment

Hi
This is in response to a question on the adobe forumsHow do I deadline a group task after a group member has claimed it. Unfortunately livecycle ES does not have any out of the box capability to set a deadline on a task when it is claimed.To solve the question posted on the forum, I have written a simple process which can be used to get around the limitation for now.
The following document explains the work around and also has the process and the custom component I had to write to get this working
Re Assigining Task To group
Any question please send me a email

Categories: Uncategorized

Importing and Exporting Form Data

June 4, 2008 · 14 Comments

A very simple but very powerful feature of Acrobat is the ability to silently import/export data with out user intervention. To do this you will have to certify the form, the end user will need to add the person who has certified the pdf in to his list of trusted identities and also give permission to execute high privilege java scripts.
The following document explain the procedure in detail,and also has a sample pdf, xdp and test data file as file attachments.
Click here to view the document

Categories: Uncategorized
Tagged: , ,