Java Step Processor Development Procedure

Developing a custom Java Step Processor can range from a few simple modifications to the user interface of the sample Step Processor provided with your installation to a fairly complex development process. The procedure in this topic is designed to provide a step-by-step procedure as an overall guide and check list for developers.

This procedure assumes that you have a basic understanding of Process applications (for information, see Introduction to Process Applications), that you have to some degree familiarized yourself with the Process Java APIs. For information on these APIs, see the topics: Working with Process Java API Classes, Process Java API Class Relationships (calling sequences), and the Process API Samples Overview (describes the Process API samples provided with the Process Development Environment).

In addition, this procedure assumes that you have already:

To develop and deploy a custom Java Step Processor, use the following procedure:

Note For information specific to developing an HTML Step Processor or Launch Step Processor, see the Developing HTML and Java Step Processors topic in this guide and also general information on developing web applications in the Help for Web Application Toolkit Developer's Guide documentation. In addition, the FileNet eXtra Web site provides a sample HTML Step Processor you can download, as well as other samples that illustrate a broader range of Web Application Toolkit functionality.

  1. Plan your Step Processor in terms of its user interface, its business processes, how it fits into the workflow definition (designed using the FileNet Process Designer), and the operations to be performed for this step. It is recommended that before you start that you review the topics: What to Customize and How and Basic Step Processor Operations.
  2. Determine whether to deploy the Step Processor as a Java application or applet, what elements need to be provided as work items (for example, Step elements, work objects, etc.), whether to customize the Step Processor by extending the existing sample Java Step Processor (using the Java Step Processor UI Toolkit provided with the Process Development Environment) or to develop your own custom Step Processor from scratch. If you need to retrieve objects from or interface with a non-FileNet system, application, or data source, you may wish to set up and configure the Process Engine EAI connector; for information on this and related topics, see Help for Process Engine Administration.
  3. As indicated in the previous step, you can either copy, deploy, and modify the sample Java Step Processor application/applet provided with the Process Development Environment (for details see the Building a Java Step Processor with the Java Step Processor UI Toolkit topic) or you can develop your own from scratch. If you are modifying the sample Step Processor application or applet, go to the next step. If you are developing your own custom Java Step Processor from scratch, skip to Step 6 below.
  4. Compile, deploy, and run the sample Java Step Processor and/or Launch Step Processor to verify that they work correctly in your development environment. For details, see the Building and Deploying the Sample Java Processors topic.
  5. Customize a copy of the sample Java Step or Launch Step Processor. This consists of creating a new version of the sample Processor and then using the Java Step Processor UI Toolkit to help in customizing the code. For details, see the Customize the Sample Java Step Processor topic. Once you have customized the user interface, content integration, and operations, you are ready to compile your Java classes (skip to Step 7).
  6. If you are building your own custom Step Processor:
    1. Customize the user interface, such as modifying graphics, layout, user controls, etc. Using your IDE (such as JBuilder, etc.) or text editor, you can copy and modify the sample Java Step Processor application/applet provided with the Process Development Environment, or develop your own. To add new User controls, modify, or hide existing controls, you may use standard Java Swing controls (e.g., JButton, etc.), or you can use the sample controls provided with the Java Step Processor UI Toolkit, or your own Swing-based or AWT-based controls, or you can mix and match as you wish. If you wish to use the sample controls provided with the Java Step Processor UI Toolkit, be sure to add the vwpanel.jar file (provided with your Process Development Environment) to your IDE panel container (for details see Building a Java Step Processor with the Java Step Processor UI Toolkit). When a workflow user opens a step assignment that references a Step Processor, the user is presented with a popup window containing the Step Processor user interface. For information on the algorithm used to determine which application to select for this step, see the Opening Step Processors topic.
    2. Create the Step Processor class. When building the Step Processor, use the Process Java APIs to:
      • Login to the Process Engine and establish a Process session (use the VWSession API).
      • Query User and Work queues for work items (for example, Step Elements), query rosters and retrieve information about users, etc.
      • Lock retrieved objects.
      • Update workflow data.
      • Complete the step (such as, doing a Save/Complete/MoveToQueue), etc.

      Be sure to include all operations needed to update workflow data and complete the workflow step. For an overview on using these APIs, see Working with Process Java API Classes. For information on API calling sequences used to query a queue, retrieve Step Elements, etc., see Runtime API Relationships. For information on developing the actions described in this substep, see Basic Step Processor Operations.

    3. Use the Content Java APIs to integrate with the Content Engine. If you are using an IDE, you can use the VWTabbedPane control and the VWAttachmentPanel beans (included with the vwpanel.jar provided with your Process Development Environment) to access attachments stored in Content Engine Object or File Stores; otherwise, you can use the VWAttachmentPanel bean in a manner similar to that used with the Java Step Processor UI Toolkit to access Content Engine attachments; for information on this approach, see Working with the VWAttachmentPanel. For information on using the Content Java APIs, see the Content Java Developer's Guide.
  7. Compile your customized Java Step Processor in a manner similar to the way you would compile the sample Java Step or Launch Step Processor. For details, see the Compile the Sample Processors topic.
  8. Create a JAR file that includes the customized Java Step Processor. For details, see the Create a Java Archive (JAR) File topic.
  9. Sign the JAR file in a manner similar to the way you would sign the JAR file for the sample Java Processor. For details, see the Signing a JAR File topic.
  10. Deploy the JAR file on the Application Engine server. Once deployed, you will need to create a JSP event page to make the Processor available to the Process Engine server. In addition, you will need to create a JSP view (UI) page. For details on these steps, see the Deploying Java Applications (Step Processors) topic.
  11. Using the Process Configuration Console, register your custom Java Step or Launch Step Processor. For details, see the Adding a Custom Processor to the Workflow topic.
  12. Once the Processor has been registered, using the Process Designer, add the Step Processor to the workflow (unless the Processor has been registered, it will not be available in the Process Designer). For details, see the Adding a Custom Processor to the Workflow topic.