LiveCycle in action

Extracting Data From Xml File

Girish Bedekar

Recently I was given the following xml

geebee@yahoo.com
tblue@yahoo.com
apink@yahoo.com

The customer wanted to email the persons listed in the emails element. They wanted to use the email component provided by livecycle. The email component takes a comma separated string when you want to email multiple people. So I used setValue component to extract the emai id’s and put them into a list. The list was then converted into a comma separated string of email addresses.
I also used the script component to accomplish the same. I have put both the solutions as file attachment . Feel free to download and deploy the lca and try it out
Click here to get the pdfhandling-repeating-elements4

—-
Original article at http://eslifeline.wordpress.com/2008/12/22/extracting-data-from-xml-file/.

Creating DDX from list of file names

Hi

I have written a simple component which creates a DDX from a list of file names. It is very common to create a package or assemble a map of documents. To do this you would have to create a DDX which needs to match the file names of documents in the map. To avoid all that hard work, I have a component which creates a DDX from list of file names.

The process also makes use of another component which writes out map contents to the file system

I have attached the process in the PDF file
Click here to access the PDF file
Click to get the PDF

—-
Original article at http://eslifeline.wordpress.com/2008/10/31/creating-ddx-from-list-of-file-names/.

Conditional set value using XPath


In my quest to use XPath functions & expressions more efficiently in LiveCycle I managed to achieve ‘conditional set value’ yesterday.

Example scenarios:

  • Add some text to email body if some condition is true/false.
  • Add some text into T&Cs if certain product is selected.
  • In a generic/single Email or Set Value step you need to construct a big block of text. eg. Offer letter with certain paragraphs based on few conditions.

Approach 1: The usual way (or one of the usual ways):

An orchestration in Workbench with few setValue steps and few conditional routes to add/append the desired text to existing text.

And these steps need to be in certain order.

Approach 2: The XPath trick

I used substring() and number() function with pure XPath expression to construct conditional set value. See the usage below.

Example:

Consider a requirement in which you wish to send an email with few extra lines added to it if product A is ordered. And if contract term is 12 months then we need to add another T&C statement in the email body.

Let’s implement that with both approaches…

Approach 1: Few set value step and routing conditions to set process variables that get used in email body.

Process Diagram:
Set Value - Route condition approachSet Value – Route condition approach
Email body:

Dear Provisioning Team,

Please send the below details to John.

System:{$ /process_data/@System $}
Agent Name:{$ /process_data/@Agentname $}
Product ordered: {$ /process_data/@Product $}

{$ /process_data/@ProductAConfigurationDetails $}

Terms and Conditions:
blah blah blah from Legal
adf
adf
{$ /process_data/@TCFor12MonthsContract$}
blah
blah

regards,
BOH Team

Approach 2: Conditional set value with XPath

Process diagram:

Set Value XPath approach

Email Body

Dear Provisioning Team,

Please send the below details to John.

System:{$ /process_data/@System $}
Agent Name:{$ /process_data/@Agentname $}
Product ordered: {$ /process_data/@Product $}

{$ substring(‘This is where the actual text gets put about the product configuration’,
50000000 * (number(/process_data/@Product !=’Product A’))
) $}

Terms and Conditions:
blah blah blah from Legal
adf
adf
{$ substring(’12 Months T&C content is written here or can be xpath expression’,
50000000 * (number(/process_data/@ContractLength !=’12′))
) $}

blah
blah

regards,
BOH Team

Explanation:

  • The above expression marked in blue puts the text in email body if the condition at the end of it fulfills.
  • By moving this logic into the email step itself I could clean up the process design significantly. I believe that LC is too good to do data transformation but common…few set value and few conditional routes for a simple text insertion?? I reckon the XPath trick gives much more cleaner approach to solve this.
  • First thing to notice in the expression is the use of a large number 50000000 . This is used to return blank substring value if the expression is false. Please adjust if your input text can be larger than this.
  • Second thing to notice is the use of comparison operator. I wanted to have 0 (zero) value for substring start value if condition is true. Boolean true is 1 so I’m using opposite operator. Eg. if(product=”Product A”) is represented as product!=”Product A”

As this is an XPath based expression we can use it in any LC component. I tried implementing if-else clause as well but that didn’t turn out well.

If you managed to read through this much then I’m sure you would love to see the undocumented ‘and’ ‘or’ keyword usage in XPath expression. I found that while experimenting and it’s an instant hit among few of my fellow LC users. It can be found here..

Let me know if you find this useful!!!!

—-
Original article at http://blog.pandyaparth.com/2009/11/conditional-set-value-using-xpath/.

Zillow + LiveCycle = Portable Real Estate Mashups

Shone Sadler

So what does Zillow and LiveCycle have to do with one another? Well not much other than I decided to do a demo around integrating Zillow with LiveCycle for MAX 2008. Zillow is a vertical platform around real estate located up in the clouds, while LiveCycle is a horizontal platform focused on enabling PDF, AIR, and Flash in the enterprise and is in the more traditional camp of on-premise software.

You can view an entire walkthrough at screencast.com Or the following lower res videos at YouTube.

Part I

 

Part II

So why did I create this demo?

  1. Of course to show off some functionality of LiveCycle and integration with AIR
  2. Illustrate the implementation of a common Engagement Pattern, Content Assembly, we see leveragedby LiveCycle customers.
  3. Show the integration of LiveCycle with a RESTfull Cloud API

Typically I have my own self-serving motivations in implementing demos. This time is no different. I have moved quite a bit over time, but failed to actually make money in the sale of any house (e.g. had to pay to sell my last house in July). So the next time my wife and I purchase a house we will be doing a lot more research than we have done in the past. However, we have always felt constrained by the tools we have used or that our agents have (we have done this a fair bit). While Zillow is an awesome resource it still doesn’t have ALL the information we are interested in. Moreover it doesn’t provide a means for us to effectively collaborate between ourselves and our real estate agent when considering one or more houses. So this demo is a proof of concept of what I was looking for and shows the value add of integrating a powerful cloud API such as Zillow with LiveCycle for creating portable Mashups.

IMPORTANT NOTE: While I have contacted Zillow prior to making this demo and they were nice enough to provide me access to their APIs (specifically their newer GetRegionPostings API) I must also point out that this demo uses their APIs in a way NOT aligned with the Zillow Terms of Use. Specifically, Zillow does not allow for their APIs to be used in anything but a Web based application, where they also expect their branding and links to show up as well. I was given the OK, purely because this was a demo application. I would suggest reading the Terms of Use provided by Zillow when signing up for a developer’s Id.

Architecture
Below is the architecture diagram for the Property Lister Demo.
lces_property_lister_arch
Brief notes on the components:

  1. At the top we have the Property Lister AIR application which communicates with
  2. Zillow, a Real Estate platform in the Sky with a RESTful API
  3. GetPropertyPortfolio Process, a service implemented in LiveCycle which a) iterates through a set of Propertiesm, b) calls GetPropertyDetailReport for each Property, and c) uses the LiveCycle Assembler service to combine all of those reports into a single PDF Portfolio.
  4. GetPropertyDetailReport Process, a service implemented in LiveCycle which generates a single PDF for a given property by a) generating a detail page and b) merging in any attachments specified by the client.
  5. Zillow Component, a Custom Java Component deployed within LC that a) creates a Service in LC that calls into Zillow and b) defines two data types that are used by the demo to communicate between clients (e.g. the Property Lister AIR app) and the GetPropertyPortfolio process.
  6. Out-of-the-box LiveCycle Services that are leveraged by the PropertyLister Application to generate a Portable Real Estate Mashup.

Trying out the Property Lister
Unfortunately, I have not setup an environment where demos such as this are available online, but even if I did for this demo I would be constrained by the Zillow Terms of Use.
For now however you will need to do the following steps:

    1. Read the Zillow Terms of User and Sign up for a Zillow Developer Id at http://www.zillow.com/howto/api/APIOverview.htm
    2. Download and install the LiveCycle trial (if you haven’t already) from http://www.adobe.com/devnet/livecycle/trial/.
      Note: This demo was built on LCES Update 1 (also known as 8.2.1)
    3. Download the Source Code for a) the AIR app b) the LiveCycle Archive and c) the LiveCycle Java Components used from Download Source Code
    4. With LiveCycle up and running go to LiveCycle Workbench and click on Window–>Show View–>Components. In the Components view you can right click the top node to then install the Java Components downloaded
    5. Next, log into the LiveCycle Admin UI (http://localhost:8080/adminui) and go to Services–>Applications and Services–>Archive Management where you can import the PropertyListing.lca file from the download.
    6. Make sure to configure your Email Service through the LiveCycle Admin UI by once again going to Services–>Applications and Services –> EmailService and setting the SMTP host/user/ and password.
    7. Import the Flex Project included in the Download to your Flex Builder environment.
    8. Make sure to set your Zillow Developer ID into the Source code for the AIR app (Currently its hardwired int the com/adobe/service/PropertyListingService.as file.
    9. Run the AIR APP!

 

 

Anyway, I hope you find this demo usefull! Its time to get back to the left over Turkey

—-
Original article at http://lostintentions.com/2008/11/28/zillow-livecycle-portable-real-estate-mashups/.

LCES Pet Store Walkthrough

Shone Sadler

Ok, So I already did a posting on the LCES Pet Store but I hadn’t learned how to do a screencast yet so now here it goes.

In this screencast I walk through the LCES PetStore application fictitiously selling my own high maintenance dog, Thor (Hey, we can all dream…).

You can see my previous/more detailed post at LCES Pet Store & Process Oriented Application Development.

To see Thor (and the LCES Pet Store) at his best see LCESPetStore at screencast.com

 

—-
Original article at http://lostintentions.com/2008/11/23/lces-pet-store-walkthrough/.

Twitter Component v2.0 for Adobe LiveCycle ES2 released!

- Mark Szulc

About 3 years ago I wrote my first custom component for Adobe LiveCycle ES, a Twitter client, that allowed you to Tweet as part of a process orchestration. I’ve seen it crop up in quite a few demonstrations over time and find it to be a good example of how extensible Livecycle ES is. Until […]

—-
Original article at http://feedproxy.google.com/~r/MarkSzulcsBlog/~3/B91CLZMA-IY/.

LiveCycle ES2 Highlights – eSignature Solution

Seth Reilly

LiveCycle ES2 now supports electronic signatures in Workspace (in addition to digital/PKI based signatures). The eSignature solution leverages the following features:

Ability to Route Arbitrary Content
Now you can route a flat pdf, .jpeg, .gif etc… for approval (basically anything that can be displayed in a web browser).
docvar
approveThis

Approval Container
A Workspace mode specifically designed and tailored for approval processes.

User Actions
Gives the LiveCycle developer full control over the buttons presented in the Workspace Chrome, and the order in which they appear. Also provides tighter integration with process routing via Destinations.
actionN

Approval Confirmation Dialog
Allows you to present a confirmation dialog with a custom EULA and inform the user that this is a binding agreement. To get this option in Workbench simply double click a defined User Action.
optIN
conf

IP Address Auditing
The ip address of the signer/approver is captured in the output of the Assign Task & Multiple Assign Task operations. This can be used to build an audit log.

Cheers,
_Seth

—-
Original article at http://livecycleapps.wordpress.com/2009/10/21/livecycle-es2-highlights-electronic-signature-solution/.

Go to Top