Archive for the 'LiveCycle Workbench' Category

Mar 13 2010

LiveCycle ES2 Guides – Adding custom validation classes to your model

The Modeler in LiveCycle ES2 ships with several built-in validation classes, which you can apply to the models properties using the Styles definition. Obviously these standard classes don’t cover all use cases, especially not validation behavior that is specific to a non-US region for example. One of the cool things about Fiber models is that you can extend them using custom ActionScript code, so that you can use your custom validation classes in your projects (I plan to write another article on working with custom methods in your model by overwriting the generated value objects).

So, you can add and apply your own validation classes to the model. You just need to refer to your custom class in the Style validation annotation of the property. First, copy the validation class itself into the correct folder of your Workbench project. That’s also the trickiest part within the LiveCycle Modeler (compared to doing this for the Flash Builder modeler). The FB modeler generates the code into your Flex project folder and you can easily find it, but Workbench doesn’t generate the code in the directory where all your other projects are located (on Vista/Win7 that is C:\Users\username\Workbench ES2\). I am not exactly sure why, but I think because the model generated classes are mostly temp files that don’t have to be checked into the server (downside is that you need to backup modifications of custom classes yourself).

That ‘temp’ folder that stores all model generated classes is much deeper on your disk drive. On my system it’s C:\Users\username\AppData\Roaming\Adobe\LiveCycle\ES2\Guides\generated\. Here you find subfolders structured per LiveCycle application. For your project, find the folder where the generated myModel.as and myModel.swf files are located. Consider this folder the ‘root’ that is used by the compiler, so this is where yoy copy your custom validator classes to.

The last step is to define the style validation annotations within the property. Basically you’d define your property like this:

<property type=”string”>
<style>
<validation>
<annotation name=”ActionScriptValidator”>
<item name=”ValidatorClass”>mx.validators.SocialSecurityValidator</item>
<item name=”allowedFormatChars”>”-()”</item>
</annotation>
</validation>
</style>
</property>

The ValidatorClass item defines the class path, and in this case the ‘allowedFormatChars’ is one of the parameters that is used by that class. Now make sure that Workbench recompiles your class (just move an entity a few pixels, save and the recompile will hapen). Now your custom validator class is compiled into the model itself and you are ready to use the related properties within your guide!

ps: Workbench will inform you on compilation errors if you made errors in your class.

No responses yet

Feb 11 2010

LiveCycle ES2 integrated with MS Sharepoint Server 2007

Very soon a connector for MS Sharepoint Server will be released. This offers bi-directional integration options to either connect to Sharepoint from a LiveCycle process, or to connect to a LiveCycle service from a Sharepoint document/folder.

I have recorded a demonstration that shows you how to store the result of a forms process in LiveCycle in a Sharepoint folder. I have used a very simple holiday request form that is filled in from the LiveCycle Workspace. After filling it in a static PDF is generated using the Output service and the result is stored into Sharepoint using one of the standard services. Check out the recording on http://www.vimeo.com/9378807

No responses yet

Jan 21 2010

Building a controlled Twitter solution using Adobe LiveCycle ES

Look at these videos that demonstrate how you can use LiveCycle ES to build a process and an AIR application to publish tweets to a corporate Twitter account where you have control on what’s published or not. Part 1 focuses on building the client with Flash Builder 4 with the LC Service Discovery plugin. In part 2 you will see how to archive all tweets in a PDF/A format within LiveCycle Content Services.

Part1: http://www.vimeo.com/8886180

Part2: http://www.vimeo.com/8886413

2 responses so far

Dec 23 2008

Accessing MS-Office (custom) properties from LiveCycle ES processes

You probably know the case, you want to convert a file to PDF and add a fax page so you can send it to a customer using your fax-server, or you just want to add a coverpage so you can archive the file in a effective way and have all the metadata nicely grouped on that coverpage.

There are simple ways to let LiveCycle ES take care of that process for you. Below a short explanation of some of the available services that are relevant in this context.

Within LiveCycle Workbench ES, one of the services in the common category that you can use is “Export XMP“. This service will extract all the available metadata from a PDF document. If you have converted a MS-Office document to a PDF document, you will be surprised what metadata is also converted. All these properties are now accessible using the service above. Here is a screenshot of some custom properties in a Word document.

Result of the Export XMP service is an XML structure that you can query. For instance, if you want to know what’s in some of the custom metadata fields, you can check this file. Here is a sample of the result of an Export XMP service.

<?xpacket begin=”” id=”W5M0MpCehiHzreSzNTczkc9d”?>
<x:xmpmeta xmlns:x=”adobe:ns:meta/” x:xmptk=”Adobe XMP Core 4.2-jc015 52.349034, 2008 Jun 20 00:30:39-PDT (debug)”>
<rdf:RDF xmlns:rdf=”
http://www.w3.org/1999/02/22-rdf-syntax-ns#”>
<rdf:Description rdf:about=”"
xmlns:xmp=”
http://ns.adobe.com/xap/1.0/“>
<xmp:CreateDate>2008-12-23T09:45:28+01:00</xmp:CreateDate>
<xmp:CreatorTool>Acrobat PDFMaker 9.0 for Word</xmp:CreatorTool>
<xmp:ModifyDate>2008-12-23T09:45:28+01:00</xmp:ModifyDate>
<xmp:MetadataDate>2008-12-23T09:45:28+01:00</xmp:MetadataDate>
</rdf:Description>
<rdf:Description rdf:about=”"
xmlns:pdf=”
http://ns.adobe.com/pdf/1.3/“>
<pdf:Producer>Acrobat Distiller 9.0.0 (Windows)</pdf:Producer>
<pdf:Keywords>”PDF, Metadata”</pdf:Keywords>
</rdf:Description>
<rdf:Description rdf:about=”"
xmlns:dc=”
http://purl.org/dc/elements/1.1/“>
<dc:format>application/pdf</dc:format>
<dc:creator>
<rdf:Seq>
<rdf:li>Marcel van Espen</rdf:li>
</rdf:Seq>
</dc:creator>
<dc:title>
<rdf:Alt>
<rdf:li xml:lang=”x-default”>This is a test document</rdf:li>
</rdf:Alt>
</dc:title>
<dc:description>
<rdf:Alt>
<rdf:li xml:lang=”x-default”>Onderwerp</rdf:li>
</rdf:Alt>
</dc:description>
<dc:subject>
<rdf:Bag>
<rdf:li>PDF, Metadata</rdf:li>
</rdf:Bag>
</dc:subject>
</rdf:Description>
<rdf:Description rdf:about=”"
xmlns:pdfx=”
http://ns.adobe.com/pdfx/1.3/“>
<pdfx:Company>Adobe Systems Incorporated</pdfx:Company>
<pdfx:Department>Development</pdfx:Department>
<pdfx:Language>English</pdfx:Language>
<pdfx:Office>Amsterdam</pdfx:Office>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end=”w”?>

Now, you will see some familiar tags in there. If you would like to access the custom property Office (With value Amsterdam) as highlighted in bold above, you will need to do the following:

  1. Store the result data from the Export XMP service in a variable of type XML (for this example this will be xmpdocxml)
  2. Create a variable of type string (In this case it will be office) to store the office location (of course you can also put it in a form template, but this is out of scope for this example)
  3. Use a set value service to set /process_data/@Office = /process_data/xmpdocxml/x:xmpmeta/rdf:RDF/rdf:Description/pdfx:Office

That’s it. You can of course repeat this for all the other elements, and do what you like with it. I have created a simple example and made it available on acrobat.com. In the sample (zip file) I included a LiveCycle LCA file that you can import, a sample Word document and an XML file that is just showing you the metadata.

If this is too much for you, there is an even simpler service to retrieve the metadata from a document. This service, Export Metadata, gives you a nice XML structure that you can browse using your XPATH editor. Note that this only retrieves the basic metadata!

2 responses so far

Oct 23 2008

Adobe on Business Process Modelling Notation (BPMN)

Recently I was asked by a large system integrator about Adobe’s standpoint on the Business Process Modelling Notation (BMPN) specification.

Not many people know that Adobe participates in quite some industry standards and supports their maturity/evolution such as BPMN, BPEL, BPDM and XPDL and that we are voting members of standard bodies such as OMG, OASIS and WFMC. Adobe is represented in all these standards bodies and actively participates in reviewing and authoring of these standards. We take a lot of that knowledge back into the decisions we make when developing our enterprise products, especially Adobe’s LiveCycle Enterprise Suite.

BPMN (Business Process Modelling Notation) is a specification for a couple of things:

  • A graphical notation. E.g. How different activities are represented in a process diagram.
  • Semantics of the graphical notation. E.g. What does it mean when you connect activities with a line.

From wikipedia:

The primary goal of BPMN is to provide a standard notation that is readily understandable by all business stakeholders. These business stakeholders include the business analysts who create and refine the processes, the technical developers responsible for implementing the processes, and the business managers who monitor and manage the processes. Consequently BPMN is intended to serve as common language to bridge the communication gap that frequently occurs between business process design and implementation.

Using the Process perspective in LiveCycle Workbench, one can visually create process maps that define and control your automated business processes. Since Workbench implements the main constructs for the graphical notation and the semantics of that notation as specified by BPMN, business analysts can create process diagrams using swimlanes, activities, events and associations following common modeling methodologies (we still have a gap to cover when it comes to modeling of Gateways).

LiveCycle Process Designer

To summarize: if you have been trained in BPMN, you will find it easy to model a process using LiveCycle Workbench.

If you want to read more on Adobe’s comments on BPEL and general standards, you should read this article on de LiveCycle DevNet:

ps: One should know that the current BPMN spec (v1.1) does not specify how a process diagram should be persisted by a modeling tool. There is no XML schema for example. However, there is another specification – XDPL – which does provide this and the BPMN v2 specification currently in review also has a defined schema for persistence. Since standards have not been defined or widely accepted, LiveCycle Workbench currently persist that process definition using custom XML for which Adobe has publish the XML Schema (which after installation can be found under the LiveCycle SDK/schema directory).

One response so far