ALBPM 6.0 Ant Libraries - Reference Documentation

Requirements

The ALBPM Ant tasks require Ant 1.6.1 or newer, and they rely on the namespace and antlib features included in Ant version 1.6.

ALBPM Ant .jar libraries

For Ant to find the ALBPM Ant Libraries, the full path to the ALBPM lib/ and ext/ directories must be passed to Ant using the -lib option. Example:

 On Unix:
 ant -lib /albpm6.0/enterprise/lib:/albpm6.0/enterprise/ext

 On Windows:
 ant -lib c:\albpm6.0\enterprise\lib;c:\albpm6.0\enterprise\ext

To avoid using the -lib argument every time, it can be specified once using the ANT_ARGS environment variable:

 On Unix:
 ANT_ARGS="-lib /albpm6.0/enterprise/lib:/albpm6.0/enterprise/ext"
 export ANT_ARGS

 On Windows:
 set ANT_ARGS=-lib c:\albpm6.0\enterprise\lib;c:\albpm6.0\enterprise\ext

Namespace declaration

Ant scripts need to include the ALBPM antlib in their project definition in order to use ALBPM tasks:

<project name="FuegoExample"
         xmlns:fuego="antlib:fuego.tools.ant.enterprise"
         xmlns:fuego.j2ee="antlib:fuego.tools.ant.j2ee">
 ...
</project>

The previous example defines the fuego namespace for accessing the standard ALBPM library of tasks and fuego.j2ee for those tasks specific to the J2EE edition of ALBPM.

Every reference to a standard Fuego task will be prefixed by "fuego:", and the J2EE-specific ones will be referenced with the "fuego.j2ee:" prefix. Like in the following snippet that uses the publish and buildear tasks:

<project name="FuegoExample" xmlns:fuego="antlib:fuego.tools.ant.enterprise">
 ...
  <target name="publish">
    ...
    <!-- Publish a process -->
    <fuego:publish fpr="myproject.fpr">
      ...
    </fuego:publish>

    <fuego.j2ee:buildear ...
      ...

    </fuego.j2ee:buildear>
  </target>
 ...
</project>

Setting fuego.basedir

Finally, the last requirement for ALBPM Ant tasks to work correctly is to define the fuego.basedir property inside the build script. This property must point to the Fuego Enterprise installation directory:

<project name="FuegoExample" xmlns:fuego="antlib:fuego.tools.ant.enterprise">

  <property name="fuego.basedir"
           value="/albpm6.0/enterprise"/>
 ...
</project>

Using ALBPM tasks

The following example represents a small but complete Ant script that uses ALBPM tasks.

The example script publishes and deploys an ALBPM project making use of:

Fuego:publish is the task that allows for publishing and deploying processes. As any other task that needs access to a Fuego directory, it must be enclosed by a fuego:session task.

A fuego:passport basically defines the authentication information needed to access a particular ALBPM directory. The fuego:session task accepts a passport reference to establish a session to the directory.

<!-- This script publishes and deploys an ALBPM Project. -->
<project name="FuegoExample" xmlns:fuego="antlib:fuego.tools.ant.enterprise">

  <!-- Include properties -->
  <property file="build.properties"/>

  <!-- Define an ALBPM Directory passport -->
  <fuego:passport id="fuego.passport"
         directoryid="default"
            preset="engine" />

  <target name="publish" description="Publish and deploy processes">

  <!-- Open a session to the ALBPM directory -->
    <fuego:session
          passportref="fuego.passport"
              verbose="true"
          haltonerror="true" >

      <!-- Publish processes -->
      <fuego:publish fpr="${fuego.project}"
                  deploy="true"
                  engine="${fuego.engine}">

        <fuego:rolemap abstract="Employee" real="Role1"/>
        <fuego:rolemap abstract="Idea Evaluator" real="Role1"/>
      </fuego:publish>
    </fuego:session>

  </target>

</project>

The example includes properties from another file: build.properties. Keeping the values that are likely to change in a separate properties file is a good practice to follow, since it allows for easy parameterization of the script.

This is a build.properties file suitable for the above example:

# ALBPM Enterprise installation directory
fuego.basedir=/albpm6.0/enterprise

# Name of ALBPM Engine to deploy to
fuego.engine=Standalone

# Project to deploy
fuego.project=/albpm6.0/studio/samples/HelloWorld.fpr