Wednesday, September 9, 2009

LiveCycle Data Services and FlexMonkey

I've been wanting to try FlexMonkey for a project at work but always had issues getting it to run our app - our app uses both SSL and PKI authentication (requires a valid cert from the user). Finally I bit the bullet and spent the time to get it up and running. Here's what I've found so far.
  • FlexMonkey does not come with BlazeDS or LiveCycle DS support out of the box. I found a single post on the FlexMonkey Google Group about this. For now, you need to recompile the MonkeyAgent to handle Secure AMF, Secure HTTP and Secure RTMP channels. Gorilla Logic is planning on supporting this in their next release.
  • Our app also uses FlexSpy when in debug mode. We have a separate Maven profile to only include FlexSpy for debug purposes. But FlexSpy runs our app under it's own application domain which is exactly what FlexMonkey does as well. So we could bring up our app inside of FlexMonkey but found some buttons and pop-ups appeared to be unresponsive. In reality the pop-ups were present but hidden by FlexSpy - I could still use my keyboard to enter data into the pop-up and the app behaved accordingly. This isn't very practical to work with so I rebuilt our app without FlexSpy and then I could see all components.
Here's what I did to get the MonkeyAgent compiled to support LiveCycle.
  1. I pulled down the Easy2BuildMonkeyAgent and Easy2BuildMonkeyLink code from their Google project.
  2. I compiled the MonkeyAgent using the Flex 3.3 SDK swcs, and the Flex 3.2 SDK automation swcs (automation.swc, automation_agent.swc, automation_dmv.swc) and the corresponding Flex 3.2 SDK locale swcs (automation_agent_rb.swc, automation_rb.swc).
  3. I added the following to my compiler options:
  • -includes mx.messaging.channels.SecureAMFChannel
  • -includes mx.messaging.channels.SecureHTTPChannel
  • -includes mx.messaging.channels.SecureRTMPChannel
  • -includes mx.messaging.channels.RTMPChannel
After compiling MonkeyAgent I added it to my webapps dir and most everything ran smoothly after that.

Everything above is on the FlexMonkey sites, but scattered across several posts and docs.