Development and deployment

The following sections describe development and deployment for both user-created handlers in fixed workflows and user-created steps in variable workflow.

Development environment

The workflow development API relies on classes and interfaces from three packages:

These packages are part of the bcgsdk.jar file, which is found among the WebSphere Partner Gateway installable files in the following directories:

In all deployed instances, the bcgsdk.jar file must be available in the application server classpath and not in the module classpath.

For development, the bcgsdk.jar file must be included in the build path of the project that contains the user exit classes, that is, in the classpath.

Deployment and packaging

Make all user-created code available to the run-time environment. Package and deploy user-created code in one of the following ways:

Adding the JAR or class files to the run-time environment makes the handler available only if the Fixed Workflow or Variable Workflow (Action) is configured to be used by the run-time environment. Handlers are configured for use like the other product-provided handlers. To configure them you must first make them known to the Community Console by importing their definitions in the Community Console through an XML descriptor file.

To import a Fixed Workflow handler, click Hub Admin > Hub Configuration > Handlers > Fixed Workflow > Import.

To import a Variable Workflow (Action) handler, click Hub Admin > Hub Configuration > Handlers > Action > Import. One of the descriptors is the handler type. Only defined handler types are allowed. To view a list of allowed handler types, click Hub Admin > Hub Configuration > Handlers > Handler Types >.

Descriptor file definition for a workflow handler

The workflow handler descriptor file uses the bcghandler.xsd schema. The following example presents a brief outline for each of the elements in the descriptor file:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2004 IBM Corp. - All Rights Reserved.-->
<!-- IBM makes no representations or warranties about the suitability of -->
<!-- this program, either express or implied, including but not limited to -->
<!-- the implied warranties of merchantability, fitness for a particular -->
<!-- purpose, or non-infringement. -->
<tns:HandlerDefinition
     xmlns:tns="http://www.ibm.com/websphere/bcg/2004/v0.1/import/external"
     xmlns:tns2="http://www.ibm.com/websphere/bcg/2004/v0.1/import/external/types"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.ibm.com/websphere/bcg/2004/v0.1/import/external
     bcghandler.xsd http://www.ibm.com/websphere/bcg/2004/v0.1/import/external/types
     bcgimport.xsd">
<tns:HandlerClassName>com.mycompany.WorkHandler</tns:HandlerClassName>
<tns:Description>My companies handler.</tns:Description>
<tns:HandlerTypes>
<tns:HandlerTypeValue>ACTION.VALIDATION</tns:HandlerTypeValue>
</tns:HandlerTypes>
<tns:HandlerAttributes>
<tns2:ComponentAttribute>
<tns2:AttributeName>Attribute 1</tns2:AttributeName>
</tns2:ComponentAttribute>
<tns2:ComponentAttribute>
<tns2:AttributeName>Attribute 2</tns2:AttributeName>
<tns2:AttributeDefaultValue>Attribute2DefaultValue</tns2:AttributeDefaultValue>
</tns2:ComponentAttribute>
</tns:HandlerAttributes>
</tns:HandlerDefinition>
HandlerClassName
The full class name of the handler implementation.
Description
General description for the handler.
HandlerTypes
The handler types for the workflow step that this handler can be used with.
HandlerTypeValue
The HandlerType value that corresponds to the workflow step type. For Fixed Inbound Workflow the allowable types are: For Fixed Outbound Workflow the allowable type is: For Variable Workflow the allowable types are:
HandlersAttributes (optional)
Any attributes that this handler can have.
ComponentAttribute
An attributes name and default values that are used to provide configuration information to the handler at runtime.
AttributeName
The name of a specific attribute.
AttributeDefaultValue (optional)
The attribute's default value.

Copyright IBM Corp. 2003, 2005