Archive for the ‘LiveCycle’ Category

During SoTR 2011 I presented on using XFA PDF forms (a.k.a. LiveCycle forms) with ColdFusion. Slides and materials are now available for download.

A after-conference addition is that Chandan Kumar from Adobe confirmed that the issue with overwritedata=”yes” in the cfpdf tag is resolved in ColdFusion so you don’t need to add it to all cfpdf populate operations anymore once the fix is released / installed.

One of the ways to translate LiveCycle Designer PDFs is using XLIFF. Since an XDP file is essentially an XML file the process is to run an XSLT transformation over the XDP to extract all the text strings. Not just the captions, but also all the tooltips, screenreader texts, image alt’s etc. Then you can send the generated document with strings to a translator, and some time later you get a translation back that you can merge into your template using a different XSLT transformation. The whole process is described pretty well in Using XLIFF for translating Adobe® LiveCycle® Designer ES form designs on Adobe DevNet.

While putting together a few extra exercises for the LiveCycle ES2 Designer Specialist training I stumbled over something weird in the XSLT templates from Adobe. While the tools for translating XLIFF files all presume the original string is in the source element and the translated string is in the target element, the Adobe XSLT templates presume the translated string is put back into the source element. So for an English to Dutch translation tools create:

<trans-unit id="09DD30F3-CE03-4FF1-92D3-067126FF904E" resname="09DD30F3-CE03-4FF1-92D3-067126FF904E">
    <source>Awesome!</source>
    <target>Keigaaf!</target>
</trans-unit>

But the XSLT templates Adobe distributes with LiveCycle Designer (look in the%programfiles%\Adobe\Adobe LiveCycle Workbench ES2\Adobe LiveCycle Designer ES2\FormTranslation\ folder) expect:

<trans-unit id="09DD30F3-CE03-4FF1-92D3-067126FF904E" resname="09DD30F3-CE03-4FF1-92D3-067126FF904E">
    <source>Keigaaf!</source>
</trans-unit>

Luckily this is easy to fix (once you figure out what is going on) by changing the XSLT template for merging the translations back into the XDP file to select the target node instead of the source node at line 66 of mergestrings.xslt:

<xslt:variable name="translatedNode" select="$s2x[@id=$idToGet][1]/target" />

A version of mergestrings.xslt with this change is available for download.

Since I am in Bangalore for a training I dropped in on the “Adobe Flash Platform Tools Preview” this evening. The agenda promised short sessions on Flash Builder 4, Flash Catalyst and LiveCycle ES, followed by food and networking. The Flash Builder (previously known as Flex Builder) session was solid. It showed Data Centric Development, where services are defined in Flash Builder and can then easily be wired into the UI because all the code for the services and value objects is generated. (See Raghu’s blog for the demo screencast). Next up was Flash Catalyst, showing a design - development workflow where a .psd file was transformed to a .fxp, which was then imported in Flash Builder to wire the data in through the new services management. Last was LiveCycle ES. Unfortunately, but understandably considering the audience, this was all about data management and not process management. What was new for me was that apparently this now wires directly into Hibernate so you don’t need to write any server side code anymore, you can have everything generated.

The Q&A focused mainly on the designer - developer workflow with Flash catalyst. The main question that was repeated several times in different words was whether this workflow put any additional constraints on the designer. And each time the answer was that good development on the design side, including the judicious use of layers, was all it took. I think this reflected the audience of architects and project managers, from developers I would expect more technical oriented questions.

Afterward the food and networking were great. Not just the Flash team from Adobe was there, but also people from the LiveCycle team and the ColdFusion team., so I got an opportunity to thank some people in person for fixes and new features I am not allowed to mention yet. And I also met up with some of the people we do business with in India.

I am currently in the UK for a LiveCycle training and when I looked out of my hotel window the view was very nice.

Winter view from Fleet (UK)

Winter view from Fleet (UK)

Then just before I was going for breakfast my boss called and asked whether I still was in the hotel. Then he told me to “Go make snow dolls”. Apparently the snow is a bit more then the people in the UK are used to and is causing major travel issues. The students are from all over the country (apparently some had to drive 4 hours under normal conditions), and due to the weather the first day of the training is canceled. So now I have my first snow day ever! (In the Netherlands we only have ice days to go ice-skating, when it has frozen enough and the ice is thick enough, but no snow days.)

UPDATE: training cancelled for the whole week based on the weather forecast, but no way to go home since all flights to Amsterdam have been cancelled at Heathrow.

I’m sure that if you have never worked with the LiveCycle training material you have no idea what that title is about. During the LiveCycle Building Applications (LCBA) training a mortgage workflow for the fictional company Fin@nceCorp is build step by step. It starts with a PDF form to submit a mortgage application, then through a workflow process with reviews by loan officers through PDF and Flex forms it ends with a rejection or acceptance letter. Along the way it introduces the key concepts of LiveCycle and when the course is complete the students should be able to build workflows in LiveCycle.

Last week I was in Lisbon to teach this course to a group of people who are about to use LiveCycle to build workflows for generating contracts in PDF. Monday and Tuesday I covered LiveCycle Developing Forms (LCDV) with a group of up to 13 people, both backend developers and forms developers. Luckily this is a somewhat normal schedule for this course, because having flown in straight from the MAX in San Francisco I was somewhat jet-lagged.

Then Wednesday and Thursday with just the backend developers we had the absolute madness of squeezing 4 days of training plus some custom content on LiveCycle installation and webservice invocation in two days. Luckily the client knew exactly what he wanted so we could skip several chapters and I just demonstrated several of the walkthroughs instead of everybody completing them, but I think this was still a little too much.

Then Friday we switched gears completely. First I wrapped up the webservices content and then in a brainstorm session we designed a process that matched a simplified version of their business case. We ended up with a master process with 7 subprocesses on the whiteboard. After some more discussion we had the in and out variables of each subprocess and I put everybody to work on a subprocess. As soon as people had defined their process with variables I wired them all together in the main process on the projector and then I helped people with issues with their individual subprocess.

I have rarely had so much fun in a training. I had to run around and was answering questions all day (I am very glad the Portugese take their time for their lunch), but it is fun to be challenged as a trainer.

What is more, I think that the students got more out of training this way then if we had followed just the regular schedule. Doing this group building process not only what is taught is really put in practice, but the additional aspects of application design, decoupling processes and API design become much clearer. It is a good thing I had some really smart people in the class because I would never have been able to write the XSLT they did in such a short time, but that just shows how even in such a short exercise skills can complement eachother.

So here is my recommendation: if you want to get the 4 day LCBA training for your team, make sure you get a trainer with field-experience with LiveCycle and tag on an extra day to design and build your first application together. It will prepare your team so much better.

MAX 2008 is over so I though I would add my list of highlights and random thoughts.

C/C++ to AS3 conversion

Last year at MAX Adobe talked a bit about converting c/c++ to AS3 during the sneak peaks. This year there was some more information and there was a session on Project Alchemy. The way it works is that Adobe has a bunch of library code that mimics the standard C libraries, a toolchain to configure and compile and then you can call your library with a bunch of glue code from AS3. This is far from finished, it is just a research project and not even a pre-product, but it is available on labs.

The demo’s were pretty impressive and showed Quake, crypto libraries (OpenSSL)  and sound code. Most of the technical stuff was way over my head, but one of the comments I did understand was that there were no OS libraries and no socket code. So I guess we will have to wait for a while before we can compile C++ database drivers to AS3 and build native database tools (unless you want to try beta drivers for MySQL).

Adobe Enterprise Developer Program (AEDP)

The AEDP is a new program to help Enterprise developers (Flex, AIR and LiveCycle ES) with direct access to Adobe support engineers. For an annual fee Adobe commits to providing tools, software and most importantly support with a guaranteed 1 business day response time. It seems tobe mostly geared towards Adobe LiveCycle ES customers.

Looks like the support is not for the other Enterprise product, ColdFusion. I guess it isn’t really needed there anyway with the engineering team being regulars in the community and on mailinglists.

Flash Catalyst

Formerly known as Project Thermo, Flash Catalyst will bring designer - developer workflows for Flex.  Designers working with Flash Catalyst can work in the same project as developers working with FlexBuilder without having to go through a whole manual export from CS4 - import into FB cycle after every change. The current Beta on labs is Mac only at the moment.

AIR 1.5 released

And it immediately fixed several crashing issues I had with the previous version.

ColdFusion IDE announced

At last Adobe announced a new IDE for ColdFusion: Bolt. The name is a tribute to the lightning bolt that used to be the ColdFusion logo. Apart from a fleeting mention of support for the native ORM due in Centaur and support for community frameworks no further information is available at the moment.

And for the random thoughts.

Which labs not to choose

To start with the bad stuff I have come up with a way to identify which labs are a waste of time. If a lab is:

  • presented by somebody from Adobe Consultancy,
  • who is not a native speaker,
  • and does not have an Instructor certification,

don’t go. It is a waste of time. The lab will be written without proper definition of learning targets, without a delivery strategy and will end with a ten minute monologue that is more about “look how much I know about Maven/EJB/whatever” then about teaching.

Adobe should wake up and realize that labs should be taught by certified instructors and evangelists.

In the interest of full disclosure, yes, I am a certified instructor. And I am not the easiest one for my students, because I want to train them to the level where if they were on my development team I would feel that I could assign tasks to them and they could complete them (as opposed to a teaching strategy where you leave nobody behind even if that slows the entire group down). But some of the labs during MAX were outright ridiculous. And not just this year, the same happens every year.

Where was LiveCycle?

As a product manager of another product said: “With more then 80 products not every product can get a mention.” But LiveCycle is Adobe’s flagship, multi-billion dollar Enterprise suite and it was nowhere. In three days the only mention LiveCycle got on the main stage was as a hidden part in a movie production workflow during a sneak peak. There were only 2 advanced sessions on the LiveCycle servers. I know LiveCycle isn’t the sexiest product around, but this is a bit extreme.

On the upside there were people at the support lab that knew about LiveCycle and they are going to open a case to investigate my installation problems.

Cloud Computing?

One of the themes of the keynote was “Client + Cloud”. So what is the progress on taking Adobe’s products to the cloud? Does ColdFusion have any licensing form to allow it to run on the cloud for a per CPU-hour price? No. Does LiveCycle have any licensing form at all to allow it to run on the cloud for a per CPU-hour price? No.

The only progress on taking the existing products to the cloud is that LiveCycle will be put on the cloud by Adobe and people can get 10 hours of cloud-time for a testdrive. “Getting our toes wet with cloud computing” was what Adobe called it. If you are going to do that, you might as well install the developer editin of LiveCycle and take it for a 1 year testdrive.

With the MS SQL Server 2008 obstacle out of the way (I am back to MS SQL Server 2005) I am finally finishing the setup of my LiveCycle ES development environment. The applications I need are:

  • LiveCycle ES with PDF Generator native application support
  • LiveCycle Workbench with LiveCycle Designer
  • Acrobat Professional
  • FlexBuilder
  • the usual browser, AIR, FlashPlayer etc.

In order to get LiveCycle ES PDFG Native Application support to work I need to install Acrobat Pro before LiveCycle ES first. For the Workbench, I need to have FlashPlayer 9 (somehow it won’t work with FlashPlayer 10), but I can not have Acrobat Pro installed. With that, the installation order becomes:

  1. uninstall all FlashPlayer versions.
  2.  install Flash Player 9 ActiveX (from the LiveCycle ES download).
  3. install LiveCycle Workbench.
  4. install Acrobat Pro fom CS4. It will generate an error and tell you it didn’t install correctly. When you run the install log analysis tool, it will tell you that yes an error did occur, but it is an unknown error with no known resolution. Ignore it, just test that Acrobat Pro works.
  5. install LiveCycle ES with PDFG and native application support.
  6. install FlexBuilder.
  7. update your FlashPlayer to version 10.

That’s it. All dependencies are now satisfied and all applications now work. Except perhaps Acrobat Pro, I still don’t know what that error was about and it will probably crash horribly in the middle of the next LiveCycle training. And it only took me 6 tries to get there.

So I have a shiny new laptop (Lenovo Thinkpad T61p) that I have been configuring for the last 2 weeks now. I have installed all the office applications and most of my development tools. ColdFusion 8.0.1, Eclipse 3.4, FlexBuilder, CS4 and MS SQL Server Express 2008. verything worked reasonably well. Except that I had to update the JDBC drivers from Microsoft to version 2 CTP, and then I had to switch to the JDBC 4 drivers because the other driver is supposedly incompatible with an 1.6 JVM. (It worked just fine with the 1.x versions of the drivers.)

And that is where the trouble started, many queries suddenly gave datatype resolution errors in ColdFusion. After some testing it turned out that problem queries are typically similar to:

	SELECT
		T.credits
		, PT.pageText AS displayName
	FROM
		test
			INNER JOIN
		pageText PT ON T.nameTextID = PT.pageTextID

In a subsequent QoQ there would be an error if the datatype of PT.pageText was an N-datatype. What fixes the problem is to change the datatype using an explicit cast:

	SELECT
		T.credits
		, CAST(PT.pageText AS VARCHAR) AS displayName
	FROM
		test
			INNER JOIN
		pageText PT ON T.nameTextID = PT.pageTextID

Not something that I fancy changing in all queries, but since this version of the driver is still a technology preview not something that really bothers me either.

Next on the list of applications to install was LiveCycle ES. Installation was a bit troublesome, the installer doesn’t recognize Flash 10, the LC Designer from LC ES is incompatible with the LC Designer from CS4 and the configuration instructions haven’t been updated for CS4 yet, but in the end I got it all installed. But not running. LC Designer crashed consistently within 3 seconds of being started. After lots of digging and searching I finally stumbled upon an explanation of the problem.

SQL Server installs a newer version of the MFC DLL on top of the one we install, and the new version has a critical bug.

Other people have reported there are lots of other applications that suddenly start crashing as soon as MS SQL Server 2008 is installed. Or maybe it is not really MS SQL Server 2008 but on of the dependencies, like the .NET Framework 3.5. I don’t know, I don’t care, I think MS SQL Server 2008 has wasted enough of my time and I have uninstalled it completely.

So yesterday I wrote about installing 2 versions of LiveCycle ES, but with the limitation that you can’t run them simultaneously. I didn’t really intend to try to run them simultaneously because I thought it would be a lot of work, but it did feel unfinished and that kept nagging. So a little over an hour ago I decided to give it a shot anyway. Not the way you are supposed to do it, but using a brute force approach. The first step was using “netstat -ano” to register all the ports in use by the JBoss and MySQL processes. After filtering that produced the following list:

?View Code WINBATCH
Active Connections
 
  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:1098           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:1099           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:1100           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:1101           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING       2392
  TCP    0.0.0.0:3528           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:4444           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:4445           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:4446           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:4447           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:8083           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:8093           0.0.0.0:0              LISTENING       1032
  TCP    0.0.0.0:49152          0.0.0.0:0              LISTENING       1032
  UDP    0.0.0.0:1161           *:*                                    1032
  UDP    0.0.0.0:1162           *:*                                    1032
  UDP    192.168.0.121:1496     *:*                                    1032
  UDP    192.168.0.121:1498     *:*                                    1032
  UDP    192.168.0.121:1501     *:*                                    1032

The next step was a search of all the configuration files to find all occurences of these port numbers. All the configuration files means everything with the extensions .properties, .xml and .ini in all the subfolders of “c:\Adobe\LiveCycle8.3\jboss\” and “c:\Adobe\LiveCycle8.3\mysql\”. I did some fuzzy selection on which of these files were really relevant and changed the port numbers to a number exactly 1000 higher in the following files:

?View Code WINBATCH
C:\Adobe\LiveCycle8.2\jboss\server\all\conf\jacorb.properties
C:\Adobe\LiveCycle8.2\jboss\server\all\conf\jboss-minimal.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\conf\jboss-service.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\cluster-service.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\httpha-invoker.sar\META-INF\jboss-service.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\jboss-ws4ee.sar\META-INF\jboss-service.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\jbossweb-tomcat55.sar\server.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\jms\hajndi-jms-ds.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\juddi-service.sar\juddiws.war\WEB-INF\juddi.properties
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy-hasingleton\jms\uil2-service.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\adobe-ds.xml
C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\mysql-ds.xml
C:\Adobe\LiveCycle8.2\mysql\my.ini

This appears to work (for some value of work). Anytime now I will get an alarm because the system overheated and imploded (it has only 2 GB of RAM), but the server started, the server.log is clean and I am logged on to both the LiveCycle 8 Admin on port 8080 and the LiveCycle 8.2 Admin on port 9080.So as long as you’re willing to bypass all the rules on how it should be done and just go for the brute force approach it appears to be pretty easy to run 2 versions of LiveCycle ES simultaneously.

Sometimes I need multiple versions of LiveCycle ES for JBoss installed, for instance a version 8.2 for delivering a training and a version 8.0 for a consultancy project. That is not easily supported out of the box. The official installation instructions for a customized install aren’t really difficult, but at over 200 pages the combined installation manuals are a bit tedious. So what we really want is to use the turnkey installation, but the standard turnkey installer will detect an installation is already present and will only allow to update and not to install alongside. Luckily that is pretty easy to circumvent if you know a little bit about the default installation paths on Windows. So here is how you do it.

  1. Do a completely standard TurnKey install of LiveCycle ES 8.0.
  2. Change the LiveCycle 8 services (JBoss and MySQL) not to start automatically.
  3. Backup the registry keys “HKLM\SYSTEM\CurrentControlSet\Services\JBoss for Adobe LiveCycle ES v8″ and “HKLM\SYSTEM\CurrentControlSet\Services\MySQL for Adobe LiveCycle ES v8″ and then delete them.
  4. Search the registry for “Adobe LiveCycle ES” and when you find a key under “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\” back it up and delete it.
  5. Move your C:\Adobe\LiveCycle8\ folder elsewhere.
  6. Restart.
  7. Do a completely standard TurnKey installation of LiveCycle ES 8.2.
  8. Change the LiveCycle 8 services (JBoss and MySQL) not to start automatically.
  9. Restore your C:\Adobe\LiveCycle8\ folder.
  10. Restore the “HKLM\SYSTEM\CurrentControlSet\Services\JBoss for Adobe LiveCycle ES v8″ and “HKLM\SYSTEM\CurrentControlSet\Services\MySQL for Adobe LiveCycle ES v8″ registry keys.

You can now start whichever version of LiveCycle you want from the services control panel. You can not run them at the same time due to port conflicts in both MySQL and JBoss, but fixing that is quite a bit more work. And I’m pretty sure this breaks the uninstall too.