Programmatically Deploying Components

You can programmatically deploy components to the service container by using the Java API. After you deploy a component to LiveCycle, you can use it within Workbench to build processes. By programmatically deploying components, you can automate the process of deploying components after a component is created or when you want to upgrade to a newer component version.

When the component is deployed, the services located within the component become LiveCycle services. As a result, you can invoke the component’s services by using an invocation method. (See Service container.)

注意: You cannot deploy a component by using web services.

Summary of steps

To deploy a component to the service container, perform the following tasks:

  1. Include project files.

  2. Create an Component Manager Client API object.

  3. Retrieve the component JAR file.

  4. Install the component.

  5. Start the component.

Include project files

Include necessary files into your development project. If you are creating a client application by using Java, include the necessary JAR files. If you are using web services, make sure that you include the proxy files.

Create an ComponentRegistry Client API object

Before you can programmatically perform an component manager service operation, you must create a ComponentRegistryClient object.

Retrieve the component JAR file

To programmatically deploy a component, reference the component JAR file. When you reference the JAR file, create a com.adobe.idp.Document object that stores the JAR file.

Install the component

To deploy a component, first install it. When installed, the component is in a stopped state.

Start the component

Start a component to invoke its services. After the component is started, its services can be started. (See .)

Deploy components using the Java API

Deploy a component by using the Java API:

  1. Include project files

    Include client JAR files, such as adobe-workflow-client-sdk.jar, in your Java project’s class path.

  2. Create an ComponentRegistry Client API object

    • Create a ServiceClientFactory object that contains connection properties.

    • Create a ComponentRegistryClient object by using its constructor and passing a ServiceClientFactory object that contains connection properties.

  3. Retrieve the component JAR file

    • Create a java.io.FileInputStream object that represents the component JAR file by using its constructor and passing a string value that specifies the location of the JAR file.

    • Create a com.adobe.idp.Document object by using its constructor and passing the java.io.FileInputStream object.

  4. Install the component

    Install the component by invoking the ComponentRegistryClient object’s install method and passing the com.adobe.idp.Document object that contains the component. This method returns a com.adobe.idp.dsc.registry.infomodel.Component object that represents the component that exists in a stopped state.

  5. Start the component

    Start the component by invoking the ComponentRegistryClient object’s start method and passing the com.adobe.idp.dsc.registry.infomodel.Component object that represents the component that exists in a stopped state.