Calling a LiveCycle Process from a PhoneGap Application

Calling a LiveCycle process from a PhoneGap application sounds complicated but in reality it couldn’t get much easier. Since LiveCycle ES 2.5 every LiveCycle process that is created automatically has a REST endpoint added. The REST endpoint will accept both GET and POST requests. By default the REST endpoint requires authentication but this can modified to allow anonymous access in the LiveCycle Administrator. (Modifying security settings for a service)
The REST endpoint makes invoking the LiveCycle Process a simple ajax call. The JavaScript code below is utilizing the jQuery ajax library (jQuery.ajax()) to invoke the LiveCycle Process and pass in the required input variable, inputXML, to the process.
var params = new Object();
params.inputXML = xml;
$.ajax({
type: "GET",
data: params,
url:"http://www.yourlivecycleserver.com/rest/async_invoke
/Digital Citizen/process/ScreeningApplicationProcess:1.0",
success: function(data){
//execute on success;
},
error: function(data){
//execute on error;
}
});
In this particular case the LiveCycle process is a long lived process and returns the process ID as the result of the ajax call. As I noted at the onset, calling a LiveCycle process from PhoneGap sounds way more complicated than it actually is!
DiceJS – A Javascript Dice Roller
I have been taking an interest in gaming in my spare time and in particlar HTML5 gaming for mobile. My HTML and Javascript chops were in mothballs over the past few years as I was focused on Adobe Flex and Adobe AIR development so I decided I’d dust them off and see what I could do.
I like simple games and a lot of times those games involve rolling dice. I decided to put together a simple piece of Javascript code to do just that. DiceJS allows for inputting the number of dice to be rolled and the number of sides on each dice. The default is for a 6 sided die to be rolled once. It’s pretty simple and straight forward.
Here’s a sample: Dice JS Sample
Here’s the source: diceJS.zip
I welcome any feedback or comments!
Enjoy!
Adobe CQ – Resources for Learning
First of all, what is Adobe CQ? Rather than reinvent the wheel, I’m going to send you here: http://www.day.com/day/en/products.html. This provides the entire overview of the Adobe Web Experience Management Platform. There are also some very informative screencasts here: http://www.day.com/discover Finally, there is a Deep Dive Webinar available here: http://seminars.adobe.acrobat.com/p3jzi4dypsq/
I’ve spent the last several months learning Adobe CQ and am going to provide you the links to what I found the most beneficial in getting started.
The Documentation:
http://dev.day.com/docs/en.html
Download and Installation:
http://dev.day.com/docs/en/cq/current/deploying/installing_cq.html
Just do the Quickstart installation. It doesn’t get much easier.
The Basics:
http://dev.day.com/docs/en/cq/current/developing/the_basics.html
First Steps for Developers:
http://dev.day.com/content/docs/en/cq/current/getting_started/first_steps_for_developers.html
Developing Components:
http://dev.day.com/content/docs/en/cq/current/howto/components_develop.html
How to Create a Fully Featured Internet Website:
http://dev.day.com/content/docs/en/cq/current/howto/website.html
If you read these articles and work with CQ to do the samples, you should have a basic knowledge of what CQ is and how powerful it can be. If you
Creating a Custom Pod for Adobe Connect with Adobe Flex
Adobe Connect is an online collaboration tool that facilitates online meetings as well as training. More information about Connect can be found here: http://www.adobe.com/products/adobeconnect.html. Connect uses individual pods to compose the application as a whole. There are pods for chat, rosters, video sharing, screen sharing, etc. The host of the meeting is able to choose what pods make up the collaboration space.
Using Adobe Flex, developers are able to create custom pods! For Connect 8, the current version, only Flash Player 9 is supported thus making Flex 3.5 the latest version of Flex that can be used. The next version of Connect, currently in development, will upgrade the Flash Player to the latest version.
For my first custom pod I decided to build something simple, yet useful, and chose to develop a RSS reader. The RSS reader would allow users to add feeds to the Room Feeds for everyone to see as well as keep track of the feeds that the user had added in My Feeds. Users would also be able to visit the sites of entries from the feed as well as share a specific entry with the room in a Shared RSS Entries list. These sections of the pod were all put together quickly with Flex using Adobe Flash Builder.
Connections:

Because the feeds needed to be saved, a database (MySQL) and a little Adobe ColdFusion were necessary to store the RSS feeds as the Connect SDK doesn’t provide a mechanism to store data between Connect sessions. Here is where I ran into my first issue. I was using Flash Remoting to call my ColdFusion components and because Connect only supports Flash Player 9 there is a security bug that causes an error to be thrown when calls are made. (This is rectified in the next version of Connect) I had already written all my ColdFusion components with Flash Remoting in mind so I ended up writing a ColdFusion layer on top of the components that supported the HTTPService in Flex which is unaffected by the security issue.
The Shared RSS Entries list was the only other piece of the puzzle that wasn’t straight forward. A users normal interaction with the RSS reader will not effect any other users interaction with the application. In the case of the Shared RSS Entries list the Adobe Connect SDK supports syncing of the application data and state between users. Every custom Adobe Connect pod must have a SyncConnector object. The SyncConnector is provided as part of the Adobe Connect SDK. In order for the Shared RSS Entries list to work, a SyncSwfEvent must be listened for and dispatched. This event will be caught by any version of the RSS reader custom pod and handled. In the case of the Shared RSS Entries list, an ArrayCollection that is bound to a list is updated with the the URL and title of the RSS entry to be shared.
There are a lot of possibilites for Connect custom pods and I am sure this will not be the last one that I develop. If you have any questions please feel free to comment on this post or send me an email. All of the code for this project and links to the documentation for the Connect SDK are below! I did have to remove my ColdFusion server information from the code, so if you want to run this yourself you will need to provide a ColdFusion server and a database to house the saved RSS URLs.
Files and Documentation:
ConnectRSSReader.fxp.zip
http://www.underprise.com/wp-content/uploads/2011/11/ConnectRSSReader.fxp_1.zip
This the Flash Builder project that has all the MXML and ColdFusion code.
Connect SDK
http://www.adobe.com/devnet/adobeconnect/sdk-eula.html
Donwload the SDK and ASDocs as well as sample applications
Adobe Connect 8 Collaboration Builder Toolkit SDK
http://help.adobe.com/en_US/connect/8.0/collaborationbuildersdk/connect_8_collaboration.pdf
Getting started with the Connect SDK
Adobe Connect Exchange
http://www.adobe.com/cfusion/exchange/index.cfm?from=1&o=desc&event=productHome&s=5&exc=14
Download other Connect custom pods and applications as well as upload your own.
The Future of Adobe LiveCycle
With all the Adobe news lately, I wanted to make sure everyone knew the future of Adobe LiveCycle. Here is the statement from Arun Anantharaman, vice president and general manager, LiveCycle and Adobe Connect.
“Since Adobe’s entry into the Enterprise market in 2002 with the acquisition of Ottawa-based Accelio, we have built a large portfolio of LiveCycle customers. We will continue to sell and support our LiveCycle products in the government and financial services markets, two areas where the LiveCycle value proposition remains especially strong. Outside of those markets, we are now planning to focus our Enterprise efforts on products targeting the digital marketer, including the Digital Marketing Suite and Web Experience Management solution. In addition, Adobe is fully committed to the success and satisfaction of our customers and we intend to build long term strategic relationships with them. We will continue to support all existing and future customers of our solutions.”
So, there you have it, feel free to ask any questions in the comments and I will do my best to get them answered for you.
