The following sections describe development and deployment for both user-created handlers in fixed workflows and user-created steps in variable workflow.
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.
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 >.
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>