Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Promotions
Estimated shipping
Tax
Calculated at checkout
Total
Review and Checkout
Adobe Developer Connection / LiveCycle Developer Center /

Extending LiveCycle ES software through custom DSC development – Part 1: Create a basic service component

by Michael Hodgson

Michael Hodgson
  • Adobe

Created

4 November 2007

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
componentsLiveCycle Designer ES4
Was this helpful?
Yes   No

By clicking Submit, you accept the Adobe Terms of Use.

 
Thanks for your feedback.

Requirements

Prerequisites

As a great deal of this article is about developing your own software component, I assume that you are comfortable coding in Java. You should also have a basic working knowledge of the LiveCycle ES workflow environment, including the LiveCycle ES Workbench tool.

User level

Intermediate

Required products

  • LiveCycle Designer ES4 (Download trial)

Sample files

  • hello_component.zip (3 KB)

This is Part 1 of the series. The goal of this article is to introduce the basic environment around a custom Document Service Component (DSC) and to show how you can go about developing one yourself. Part 2 will expand on that information and demonstrate more advanced Java constructs (beans, enumerated types, etc.).

With Adobe LiveCycle ES software, you have the ability to extend the product's functionality using Java classes. This means that you can develop your own Java classes that act as operations within a LiveCycle ES workflow. Extending the LiveCycle product in this way enables you to add your own functionality, interact with your existing programs, and integrate with third-party applications. Once a component is deployed to LiveCycle ES software, the services contained within the component become LiveCycle services.

Component Architecture

Document Service Components consist of three main elements (see Figure 1):

  • Service class(es): your Java classes containing the code that is executed when the service is run. The service will have at least one class and quite often will contain several classes, depending on the complexity of the project.
  • Resources file(s): additional libraries, images, property files, and other resources required by the service. This may include utility JAR files as well as the icons for your DSC. (I'll explain the icons later.)
  • Component file: a single component.xml file describing all aspects of your component to LiveCycle ES. The component.xml file is used for the DSC property sheet as well as several other operations.
DSC Architecture
Figure 1. DSC Architecture

These files will be combined into a single JAR file that will be imported into LiveCycle ES software using the Workbench tool.

A simple DSC

The easiest way to explain DSC development is to build a custom component. Here I will use a very simple "Hello, world" example consisting of a single Java class file and the required component.xml.

The Java class

Create a simple project and Java class file using your favorite editor (I prefer Eclipse, but the choice is up to you) called helloComponent.java. Put it in whatever package you want; I'm using com.adobe.sample. Add a method that takes a string and returns another. You can then add some code to return a string that includes the input string—something like this:

package com.adobe.sample; public class helloComponent { public String hi(String yourName){ return "Hello, " + yourName; } }

Compile the class into a .class file.

The Component XML file

Okay, now that you have a simple Java class, add the component descriptor file. To be frank, it's a bit of a pain to write the XML file from scratch. You can copy one from an existing component (or from this article).

<component xmlns="http://adobe.com/idp/dsc/component/document"> <component-id>com.adobe.sample.helloComponent</component-id> <version>8.0.0</version> <supported-connectors/> <supports-export>true</supports-export> <services> <service name="helloComponent" orchestrateable="true" title="Hello Component"> <hint>A simple component to show how to build a DSC</hint> <auto-deploy major-version="1" minor-version="0" category-id="Hello"/> <implementation-class>com.adobe.sample.helloComponent</implementation-class> <operations> <operation name="hi"> <hint>Returns a string</hint> <input-parameter name="yourName" title="Put your name here" type="java.lang.String"> <hint>Put your name here</hint> <supported-expr-types>Literal,XPath,Template,Variable</supported-expr-types> </input-parameter> <output-parameter name="result" title="Result" type="java.lang.String"> <description>A message from the component</description> <hint>A message from the component</hint> </output-parameter> <description>A Hello, world component</description> </operation> </operations> </service> </services> </component>

This sample includes the following tags:

  • component-id: a unique identifier for your component.
  • version: the version info for your component
  • supports-export: specifies whether the component should beincluded if you export an archive that uses the component; that is, should thecomponent be exported as part of the LiveCycle Archive (LAR) file.
  • services: describes the services included in this component(this one only has one service)
    • service name: the name of the serviceonce it is deployed
    • auto-deploy: The category-id attribute is the name of the service category in which this componentwill be deployed.
    • implementation-class: the package andclass name of your component
    • operations: These equate to publicmethods in your class. Any methods you wish to expose need to have theirown operation tag.
      • operation name: the name of the method
      • input-parameter: where you list themethod's input parameters. Note that the type attributecorresponds to the Java class for that parameter.
      • output-parameter: the object that isreturned by the method.

Note that there are many other tags, but this is all we needfor this simple example.

Make a JAR file

Now that you have a compiled class file and the propercomponent.xml file, you can create a Java Archive file that will contain all ofthe component parts. The JAR file will be imported into LiveCycle ES software usingthe Workbench tool. You can build the JAR file using a command line tool orusing your IDE; however, there are a few things to keep in mind:

  • Include all java class files
  • Include all resource files (images, utility jar files, otherresources)
  • Include the component.xml; make sure it's at the root.

Note: If you use Eclipse to create your JAR file,make sure that that the "Compress the contents of the JAR file"option is off. You will not be able to import compressed JAR files.

Import your component

The following steps will import your component intoLiveCycle ES software:

  1. Open LiveCycle Workbench ES and log in to a LiveCycle ES server.
  2. Switch to the Components window (if you don't see the Components window,choose Window > Show Views > Components from the menu bar).
  3. Right-click the root of the Components tree and choose "InstallComponent…"
  4. Browse to your JAR file and click Open.
  5. Expand the Components tree and find your component (the components arelisted by package and class name).
  6. Right-click the component and choose Start Component.

The component should now appear in the Services tab underthe category you specified in the component.xml file (see Figure 2). You cannow use your component in your workflow process. Note that the property sheetwill reflect the information you put in the component.xml file.

The imported Hello component
Figure 2: The imported Hello component

Where to go from here

This article shows a pretty simple component, but it is a starting point. To learn how to create an advanced service component, read Part 2 of this series. For more in-depth information on developing components, please refer to the official Adobe documentation.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

More Like This

  • Creating enterprise database components
  • Adding navigation tabs to Adobe LiveCycle Workspace ES2
  • Invoking web services using custom components
  • Displaying a list of participants for a review stage in e-mail for Managed Review & Approval Solution Accelerator 9.5
  • Compressing and decompressing files using a LiveCycle ES2 custom DSC
  • Adding SMS, fax, e-mail, and voice notifications to LiveCycle ES processes

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement