Saturday, November 19, 2011

Moving across the pond

I've been a little quiet on my blog recently; moving from the UK to Canada took a little more of my time than anticipated! I'm now living in Vancouver, BC although in temporary accommodation until we secure an apartment. As soon as I'm back up and connected properly I'll be starting a series of posts on my recent mobile development experience with some tips on getting started with Flash Builder 4.5 for mobile.

Tuesday, November 8, 2011

New resource for ADEP information on Adobe Blogs

A new blog has been created by the guys at Adobe to collate all the best posts from around the web which focus on ADEP and other Adobe enterprise products.  Well worth a visit and there is already some great content up there:

The ADEP Post
The ADEP Post is a human-moderated aggregator of the best user assistance content created by the LiveCycle/Adobe Digital Enterprise Platform community. The community at large includes partners, users, customers, and Adobe professionals.

This blog aggregates content relevant to both the LiveCycle Enterprise Suite as well as the recently-released Adobe Digital Enterprise Platform

Friday, October 14, 2011

Removing images from ImageFields using JavaScript

When adding an ImageField to a form it's a common requirement to allow a user to remove the image.  By default clicking on the image field will only let the user replace it with another image.  If you want to remove it altogether then this little piece of code attached to a button will help:

imageField.rawValue = null;

Tuesday, October 11, 2011

Overview of the ADEP Document Services modules

When LiveCycle became ADEP Document Services all of the existing modules were ported over but I thought it would be useful to revisit them all and see what as new.  This post gives a summary of the modules which are available to any Document Services solution (excluding the foundation services which come with all Document Services modules) and should be familiar to those who have worked with LiveCycle ES1/ES2 in the past.

Monday, October 10, 2011

LiveCycle Content Services in the ADEP world

Server

A source of confusion I've come across when explaining the new world of ADEP to those familiar with the LiveCycle days is what has happened to Content Services.  Content Services was essentially the repository for storing files and anything else you needed persisting in your application.  It was built around the Open Source CMS by Alfresco and was used on almost all of the projects I worked on.  In the move to ADEP it's the one module the fate of which I wasn't 100% sure of.

Sunday, October 9, 2011

Defining Document Services Custom Components (DSCs)

Plugs

I've written a few custom components in my time working with ADEP but recently came across an excellent summary of what exactly these little (or in some cases large!) pieces of code actually are.  A recent blog post on the Adobe ADEP blog summarised it nicely:
A DSC is a component that can be installed on a Documents Server and introduces new functionality. It stands for Document Service Component. Most product components are DSCs but customers can write their own DSCs to create new integrations or functionality that require a higher level of sophistication than is appropriate with the use of standard integration options (e.g SOAP) or scripting/process maps. They are basically POJOs with nifty enterprise configurations around them that allow enterprise class life cycle, versioning and configuration (e.g. in an enterprise BPM system you don’t necessarily want a new version of a component to alter the way an inflight process is operating, or how a completed process reports audit data…) or even have to bounce the server to change the implementation of the DSC. It is definitely part of the secrete sauce of LiveCycle/ADEP Document Services.

Source: ADEP Blog

Wednesday, October 5, 2011

The rarest of things - user friendly customer service

It's a sad state of affairs when I feel compelled to write about a good customer service experience but that's where we are at the moment (and something that I've seen improved hugely with tools such as those Adobe is creating at present but more on that in a later post).  I had a problem with my HTC Desire HD phone (the SIM card cover was a bit wobbly) so decided to set about ordering a replacement.  I logged onto the HTC website dreading what I presumed would be a long and painful process of filling out some long form before waiting days if not weeks for a reply.  What I actually found was an easy to use support system with a variety of different options to go about submitting my query.

Screenshot of the HTC support chat


Clicking on the "Contact Us" button (note to HTC - this was a little difficult to find as I had to scroll through a long page of images to do with the phone before reaching it) popped out a tabbed window with three options: call (with long office hours), email and chat.  I went straight for the chat option and sure enough was instantly through to a human (thankfully not one of those terrible robots that tries to guess the answer to your question with some hopeless FAQ page).  The agent was helpful and got everything sorted for a free replacement SIM card cover in no time at all.

It's this sort of experience that keeps customers loyal.  I've never had an experience as easy as the one I just had with HTC and have already told colleagues and friends about how good they were in resolving my problem and it will certainly make me more likely to buy one of their phones again.

Now if only my bank provided a service like this I could finally stop giving myself a hernia every time I have to ring up...


Monday, September 26, 2011

Posting source code on Wordpress.com hosted blogs

The one plugin I loved from hosting my own Wordpress.org blog was the excellent SyntaxHighlighter plugin.  After trying to replicate it on Wordpress.com I eventually found that it's already baked in but woefully under documented. Follow the link below for the documentation on how to start using it:

http://en.support.wordpress.com/code/posting-source-code/

Acrobat Reader Extension limitations

I've been doing a piece of work for a customer who wanted a simple form distributed around their organisation for staff to fill in and return.  The only additional requirement was that end users need to be able to save the document whilst filling it in.  Most of my work to date has been using the Adobe LiveCycle product suite and so I naturally turned to Reader Extensions ES2 which would give end users the ability to save documents offline but comes at a rather large premium in terms of licence costs.

Friday, September 16, 2011

Displaying Base64 images in Designer

A recent project required me to write a custom component to merge image data with some text.  This was simple enough in itself but testing the output Base64 image data with PDF files proved a pain.  As a result I made a very simple PDF in Designer which allows you to test your Base64 encoded image strings to see how they'll look in a PDF document.  The following link will let you download the form which can be opened in designer.  The archive also contains a very basic data schema and test data to get you started.  Just replace the Base64 string in the "sampleData.xml" file with your own string.  Fire up Designer and click the Preview tab to see if the image is displaying properly.

Download Base64ImageTest.zip

Monday, September 5, 2011

Back from my travels

After a fantastic 2 months travelling SE Asia and Australia I'm finally back in the UK.  Unfortunately my web hosting expired during my travels so I had to move my Wordpress database over to wordpress.com (not easy on a slow Vietnamese computer in downtown Saigon!).  A few things seem to have been lost in the transfer such as the plugins I had for displaying code and the theme I was using but other than that it seems fine.  Gone are the days when I used to love hosting my own websites; it's just so much less hassle to have it hosted and maintained on your behalf!  If I get on with wordpress.com then I'll restore my domain name to permanently point here (they make you pay for the privilege!).

Just about to embark on some custom component work for a large public sector organisation so expect some more posts on that area soon.

Wednesday, June 29, 2011

Relative vs Absolute paths for Form fragments

Here's another gotcha when using LiveCycle Output ES2 that's had me stumped for a few hours.  I designed a form which used a number of fragments which tested fine within designer.  Once deployed to the server I was always getting blank forms.  A quick check of the logs revealed the following warning:

ALC-OUT-002-058: Cannot retrieve the resource from Repository Path.

A bit of digging around and I hit the a knowledge base article on Adobe's site.  Basically there's a "limitation" with the way the form is compiled which means relative paths within fragments and XDPs can cause problems.  The solution is to turn the relative path references (which are inserted by default in Designer) into absolute paths.  Doing this sorted the problem for me but this is something that needs fixing!

Tuesday, June 21, 2011

Blank screen when opening process in Workbench

Back to working with LiveCycle ES2 on a new project and had problems opening any process after installed Workbench ES2 on my laptop.  When opening a process in Workbench ES2 I was being shown a grey tab with no content.  The workaround seems to be to run Workbench as an Administrator (right click on icon > Run as Administrator).  Solved the problem but don't know why it needs it!

Sunday, June 12, 2011

Connecting to LiveCycle ES2 Repository outside of Workbench

When trying to test some forms I was struggling to remember the location of the LiveCycle repository.  Turns out that you can access it via WebDav from Windows or directly from a browser using the following:

[code]

http://<server_name>:<port>/repository

[/code]

Login with your usual username and password and you'll be able to browse the repository hierarchy.

Wednesday, April 13, 2011

JBoss - using properties-service.xml to set environment variables

In every JBoss installation there will be a file called "properties-service.xml" in the deploy folder.  This file allows you to setup environment variables (rather then setting them at the JVM/System level) which all deployed applications can then use by calling the System.getProperty() method.  Just uncomment the section shown below to enable some global properties or use the URLList to point to external properties files:

[code language="xml"]
<!--
Set raw properties file style properties.
-->
<attribute name="Properties">
ATTRIBUTE_NAME_1=somevariable
ATTRIBUTE_NAME_1=anotherVariable
</attribute>
[/code]

Thursday, April 7, 2011

Debugging Flex 3 applications with Flash Player 10

I came across a problem recently when trying to debug my application after upgrading from Flash Player 9 (Debug version) to 10.2 (Debug version).  As soon as I upgraded my application stopped logging.  I searched everywhere and whilst I found a lot of people with the same problem never really found an answer.

After a lot of digging it appears to be the way you target the flash player version.  My application was targetting Flash Player 9 (in my flex-config.xml):

[code language="xml"]<target-player>9.0.124</target-player>[/code]

Changing this to 10 started the trace logging again.  As I wanted to maintain the v9 target I've ended up reverting back to Flash Player 9 to get the logging working again.

Wednesday, April 6, 2011

get-collection-size() vs size() in LiveCycle

Just a note to be careful when using the XPath expressions get-collection-size() and size() in LiveCycle to count the number of elements in a list variable. If your list is empty the two functions will not return the same value

Creating a test process to demonstrate this I added three variables:

  • lstTestList

  • intCountList -> count(/process_data/lstTestList)

  • intCollectSizeList -> get-collection-size(/process_data/lstTestList)


Running this process on an empty list gives the following output:

  • intCountList -> 1

  • intCollectSizeList -> 0


So if trying to find out whether or not a list is empty use get-collection-size() and not count()

Tuesday, March 29, 2011

ASDoc - wading through the errors

ASDoc is a nightmare. What should have been a simple task turned into a day of trawling the net trying to find the cause of the seemingly endless errors preventing me from running it. Eventually I got it working so here's a short post explaining the pitfalls I faced.

  • Include the Flex libraries in your -library-path argument (i.e. flex.swc, rpc.swc, framework.swc, utilities.swc). Without this I was getting errors from asdoc not being able to find some of the standard classes.

  • Check your code! Some of the errors I was getting were actually problems that just weren't throwing errors (some of my event dispatching classes were not extending EventDispatcher, this threw lots of errors whenever asdoc encountered dispatchEvent )

  • Give your -source-path as the root of your application but use -doc-sources to list only those folders you actually want documenting


For reference here is my very simple ANT script for generating my ASDocs:

[code language="xml"]

<project name="ASDoc Build Script" default="main" >

<!--
Read in the properties file which contains the locations
for all paths referred to here
-->
<property file="asdoc.properties" />

<!--
Main Target:
Cleans and compiles ASDocs with a log
-->
<target name="main" depends="clean, log, create-docs" />

<!--
Delete and recreate the asdoc output directory
-->
<target name="clean" >
<delete dir="${output.dir}" />
<mkdir dir="${output.dir}" />
</target>

<!--
Run asdoc.exe on the source documents passing all required
parameters to asdoc
-->
<target name="create-docs" >
<exec executable="${asdoc.exe}" failonerror="true" >
<arg line="-source-path '${root_src}' " />
<arg line="-doc-sources '${framework_src}' '${actionscripts_src}' " />
<arg line="-library-path '${irmds_library.dir}' '${flex_library.dir}'" />

<arg line="-main-title '${main.title}'" />
<arg line="-window-title '${window.title}'" />
<arg line="-output '${output.dir}'" />
</exec>
</target>

<!--
Write out a log file
-->
<target name="log" >
<record name="${output.dir}/asdoc-log.txt" action="start" append="true" />
</target>
</project>

[/code]

Monday, March 28, 2011

Flex AutoScroll to component with focus

Really useful library for ensuring that the active component (i.e. the one which has focus) is currently viewable: Flex AutoScroll Library

Particularly useful for users who can only use the keyboard. To setup I added an event listener to my main MXML component:

[code language="as3"]
this.addEventListener(FocusEvent.FOCUS_IN, AutoScroll.autoScroll);
[/code]

Thursday, March 10, 2011

Applying focus to Flex application on startup

On a recent project we carried out some accessibility testing and one of the problems faced was with keyboard users who couldn't use a mouse. After loading the application (by typing in the URL in the address bar) the users couldn't tab to the input fields on the application, focus would never reach the flex app at all. After searching around I eventually found a little code snippet in a comment on Flex Examples.

[code language="as3"]
private function setApplicationFocus():void{
navigateToURL(new URLRequest("javascript: document.getElementById(<DOM_ID>).focus();"), "_self");
focusManager.setFocus();
}
[/code]

The above is called in the Application object on creationComplete.

Tuesday, March 8, 2011

Turning off all process recordings in LiveCycle

A useful tip appeared on the LiveCycle product blog a few days ago which outlines the very simple process for turning off all process recordings; something we want to do before every release.

How to Globally Turn Off LiveCycle Process Recording