Deploy a composite application

In order to run a composite application, you first deploy it to an Experience Server. You can deploy composite applications using Experience Services installed in Flash Builder, command line tools, or Package Manager.

Deploy a composite application using Experience Services

You can use the Experience Services Plug-ins for Flash Builder if your project is enabled for Composite Application Framework Services.

To deploy an application, right click an application (AXML) file and then select Composite Application Framework > Deploy Composite Application. When you use this method to deploy an application, Experience Services also deploys all catalogs that the application file references.

You can also deploy a single catalog. Right-click a catalog (CXML) file and then click Composite Application Framework > Deploy Composite Application Catalog. Experience Services deploys only the catalog and the files that it references. It does not deploy any applications.

Deploy a composite application using command line tools

Composite Application Framework supports deploying a composite application using command line tools. Currently, command line deployment is supported by providing Ant tasks to use with Apache Ant. For more information on Apache Ant, visit ant.apache.org.

The mosaicTasks.jar that is provided with the Composite Application Framework SDK defines the Ant tasks for deploying composite applications and catalogs. To access the tasks from an Ant script, the mosaicTasks.jar must be available and defined as a resource. For example:

<taskdef resource="mosaic.tasks" classpath="${AEP_SDKS}/mosaicTasks.jar" />

After you have defined the resource, you can use the mosaic-catalog and mosaic-application tasks to deploy composite applications and catalogs to an Experience Server. For example, to deploy a composite application:

<mosaic-application 
    action="import" file="applications/Basic.axml" 
    property="response" 
    protocol="http" server="localhost" port="4502" 
    username="admin" password=admin" />

To deploy a catalog:

<mosaic-catalog 
    action="import" file="catalogs/Concepts.zip" 
    property="response" 
    protocol="http" server="localhost" port="4502" 
    maxwait="360000" 
    username="admin" password=admin" />

The 'name' attribute of the root Composite Application Description Language (CADL) element specifies the unique name of the application or catalog. The root element for a composite application (AXML) file is <app:Application>. For a catalog (CXML) file, it is <catalog:Catalog>.

The catalog.zip file contains not only the CXML file, but also any assets to be loaded into the catalog. When you use Experience Services to deploy a catalog, the catalog archive (ZIP file) is created and stored in the output folder of the project.

You can also use standard Ant tasks to build the ZIP file. Ensure that the CXML file is in the root of the archive and that you lay out the components in the same relative paths as they are to be deployed to the server. For example, if the CXML contains /Catalog/TileClassList/TileClass/Content[@uri='${catalogURL}/tiles/Basic/Basic.swf'] (XPath notation), then the archive should contain the file "Basic.swf" in the folder "tiles/Basic/". For more detailed examples, install the Composite Application Framework sample applications and examine the Ant build.xml scripts.

<mosaic-application action="import" file="applications/ClientDashboard.xml" property="response" protocol="${protocol}" server="${server}" port="${port}" username="${username}" password="${password}" />

When you import an application, if an application currently exists on the server with the same unique name, the import action replaces the existing application. The import action replaces the application only if the user has permission to modify the application.

When you import a catalog, if a catalog currently exists on the server with the same unique name, the import action replaces existing components and adds new components. The import action replaces and adds components only if the user has permissions to modify those components and the catalog.

For more information on using Ant tasks, see Composite Application Framework Task Reference.

Deploy a composite application using Package Manager

After your application is working as expected and tested, you can use the Experience Services Package Manager to share it. For example, after testing the application in your staging environment, convert it to a package that is ready to install in a production environment.

Create an Experience Services package

  1. Go to http://[host]:[port]. (For example, http://localhost:4502.) Login to the Experience Server with your username and password. The default value for both the username and password is admin.

  2. Click Packages.

  3. Click Create Package. Enter a name for the package and a version number, and then click OK.

    Optionally, select a group for the package. You use groups to organize items in Package Manager.

  4. Click Edit. On the General tab, enter a description for the package. For example, A composite application and catalog.

  5. On the Filters tab, click Add Filter.

  6. For Root Path, enter /content/mosaic/applications/[application name], and then click OK. You can also click the magnifying glass icon to browse to select the Root Path.

  7. Add another filter with the root path /content/mosaic/catalogs/[catalog name].

  8. Add additional filters for any other catalogs that contain assets that your project uses, if necessary.

  9. Click Done, and then click Save.

  10. In the list of packages, for your new package, click Build. Then click Build to confirm that you want to build the package.

    The Activity Log frame displays the progress of the build.

  11. For your package, click Download. Save the file in a location where it is available for sharing, such as a shared file server.

Install the composite application using Package Manager

  1. Go to http://[host]:[port]. (For example, http://localhost:4502.) Log in to the Experience Server with your username and password. The default value for both the username and password is admin.

  2. Click Packages.

  3. Click Upload Package.

  4. Browse to the package that you want to install to select it, and then click OK.

  5. In the list of packages, for the package that you want to install, click Install. Then click Install to confirm that you want to install the package.

  6. To test that the application is installed correctly, from a machine that can access the server, access the application using its URL.

    By default, the URL uses the format http://[host name]:[port]/content/mosaic/#/applications/[application name]).