Developing HTML and Java Step Processors

A Step Processor is an application that provides and processes the information and resources that a user (a workflow participant) needs in order to complete a step in a workflow. When a user opens a work item, the Step Processor displays the instructions, the attachments retrieved from an Object or File Store, current field values, response options, and other resources necessary to allow the user to process and complete the step.

The following topics provide information on developing a custom HTML or Java Step Processor:

Use these links to find information on each of these topics.

Introduction to Step Processor Development

Developing a custom Step Processor application typically involves customizing the user interface, how the application accesses data and other resources, and how it interfaces with the Process Engine and related services. As previously indicated in this guide, there are two types of Step Processors (Step Processors and Launch Step Processors):

Development of a custom Step Processor can range from relatively simple changes, such as customizing the user interface to modify the "look and feel" of a FileNet-supplied sample Step Processor, to more complex changes that modify the Step Processor's layout and controls for specific business logic requirements, to even more extensive changes involving content integration, accessing different data sources, modifying access, making authentication changes, and so on. You can also create your own customized-from-scratch Step Processor.

All Step Processors, whether HTML or Java, require certain basic operations, such as logging into the Process Engine and establishing a Process session, querying for Step Elements (work items), updating parameters, and completing the step. While your application may require additional operations (no description of Step Processor operations can be all-inclusive for all possible applications), these descriptions will help you get started. For details on using the Process Java APIs to perform basic Step Processor operations, see Basic Step Processor Operations.

What You Can Customize and How

The following table provides a summary description of the kinds of things you can customize for a Step Processor and how. The table describes levels of customization from the least complex (making some modifications to the basic "look and feel" of the user interface) to the more complex (such as modifying the user interface page layout, adding new User Controls, etc.) to still more complex (involving Content integration) to the most complex (customizing a Step Processor application from scratch). These levels of customization — and how to proceed with that level of customization for each type of Step Processor (HTML and Java) — are described in the table.

Note No description can be all-inclusive for all possible scenarios. This table provides general guidelines that summarize some, but not all, of the many ways that you can customize a Step Processor.

Customize

Changes

Description

User Interface Modify the basic "look and feel" of the user interface.

Modify the basic appearance of the Step Processor. Modify colors, logos, graphics, fonts, and banners to fit your company's look and feel and the purpose of the Step Processor, as follows:

  • HTML Step Processors: Modify/customize the "View" UI JSP, UI Module (JavaBean), XSL stylesheet, and CSS (Cascading Style Sheet). Remember to verify that the "Event" JSP redirects control to the appropriate corresponding UI JSP page, consisting of static HTML and calls to the render methods (to transform the XML data into HTML) of the UI modules. You can copy and modify the sample HTML Step Processor provided on the FileNet eXtra Web site or you can develop your own. For additional information, see Developing an HTML Step Processor below.
  • Java Step Processors: Using your IDE (such as JBuilder, etc.) or text editor, you can copy and modify the sample Java Step Processor provided with the Process Development Environment (for details see Using the Sample Java Step Processors), or you can develop your own Java Step Processor user interface.
  Modify the page layout or structure of the Step Processor.

Modify the page layout or structure of the Step Processor to match the type of company forms, documents, or activities this step is intended to accomplish, as follows:

  • HTML Step Processors: Create/use an object (in the HTML header section) for the HTML page. In the layout section, the WcmUI.render method is called for each UI module that generates HTML output from XML. The WcmUI.render method in turn calls the individual render methods of the UI modules. Override the base UI module methods to customize the presentation. In addition, you can create custom tab bars, tool bars, and other UI elements and place them into a containment module using the appropriate UI module's methods. For additional information, see Developing an HTML Step Processor below.
  • Java Step Processors: Using your IDE (such as JBuilder, etc.) or editor, you can copy and modify the page layout of the sample Java Step Processor provided with the Process Development Environment (for details see Using the Sample Java Step Processors), or you can develop your own Java Step Processor layout and interface.
  Add new User Controls, modify existing Controls, or hide existing Controls.

Modify the controls you want to add, modify, or delete (removing unwanted existing controls is recommended over commenting them out), as follows:

  • HTML Step Processors: See previous description above to add/customize controls for the user interface. Modify/customize the "Event" JSP page to call the controller methods to handle user actions invoked from an HTML page and redirect the control to the corresponding UI JSP page. You can copy and modify the sample HTML Step Processor provided on the FileNet eXtra Web site or you can develop your own. For additional information, see Developing an HTML Step Processor below.
  • Java Step Processors: 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).
Content Integration Modify integration with the Content Engine to access Content Engine objects.

Modify integration with the Content Engine to access Content Engine objects from an Object Store or a File Store or from other data sources, as follows:

  • HTML Step Processors: The Web Application Toolkit data providers are JavaBeans that pass data between Workplace UI modules and the Process Engine and Content Engine Java APIs. Each data provider caches its data to the data store bean, providing a common connection point for one or more UI modules. For example, the WcmAuthoringDataProvider (all Workplace data provider classes extend WcmDpModuleInterface) calls to the appropriate Content Java API to handle data for adding, retrieving, and publishing documents, which is displayed by WcmAuthorModule; the WcmEProcessDataProvider calls to the Process Java API to handle workflow-related data, which is displayed by the Workplace WcmQueueNavigation and WcmQueueContentsListView APIs; and so on. In addition, you can create new data providers to retrieve data from other backend sources, such as from a database server, mainframe, or other legacy system. For additional information, see Developing an HTML Step Processor below.
  • Java Step Processors: You use the Process APIs to integrate with the Process Engine. If you modify a workflow definition to create a new queue that will include work objects retrieved from the Process Engine, use the VWSystemConfiguration class (for information on configuration-related API calling sequences, see Administration and Configuration API Relationships). For information on API calling sequences used to query a queue and retrieve Step elements, etc., see Runtime API Relationships.
Build From Scratch Create Step Processor from scratch using a framework that incorporates a custom user interface and integrates Content data and Process Engine services.

If your environment requires developing a custom Step Processor from scratch, proceed as follows:

  • HTML Step Processors: An HTML Step Processor is built within the framework of the J2EE MVC model, where the "C"ontroller layer includes a controller bean and an event JSP (to instantiate and connect the UI modules, data providers, and the controller bean) that maps events to the "M"odel, which includes data provider beans (gather data from the Content Engine Java APIs and the Process Java APIs) and data store beans (persist session state data) that provide data to the "V"iew component, consisting of a UI JSP and module (bean) that render the XML data from the Content and Process Engines that are returned to the UI module. An XSL transformation object applies an XSLT stylesheet to render the XML and return an HTML page in response to the client browser's HTTP request. For additional information, see Developing an HTML Step Processor below. Note that all Step Processors must, at a minimum, perform certain basic operations. For information on these, see Basic Step Processor Operations below. If your environment requires integration with an outside or legacy system or application, you may wish to use the Content Engine and/or Process Engine EAI Connector to retrieve objects. For information on using the Process Engine EAI Connector (or other connectors), see Overview of FileNet Enterprise Application Integration (EAI) for the Process Engine.
  • Java Step Processors: Either copy, deploy, and modify the sample Java Step Processor application/applet provided with the Process Development Environment (for details see Building a Java Step Processor with the Java Step Processor UI Toolkit), or develop your own. If you are developing your own, the Step Processor Development Procedure provides an overall step-by-step approach of the entire custom Step Processor development procedure. Note that your new Step Processor will need to use the Process Java APIs to login to the Process Engine and establish a Process session to perform Step Processor runtime operations (for information, see Working with Process Java API Classes). For information on API runtime calling sequences used to query a queue and retrieve Step elements, etc., see Runtime API Relationships.

    As indicated above, to add new User controls, modify, or hide existing controls for Java Step Processors, etc., you can 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 (for details see Building a Java Step Processor with the Java Step Processor UI Toolkit). You may wish to create Work Performers for specific operations on a workflow step (for example, you may wish to develop a Component Integrator-based Work Performer (automatically polls the queues) to obtain a JMS or Java object (including retrieving objects from a Content Engine Object Store or from an external system or application), or a daemon-based automatic Work Performer (you will need to specify polling). For information on creating Work Performers for Step Processor operations, see Developing Work Performers.

    When developing a Java Step Processor, you will need to consider whether to deploy it as an application or an applet. For guidance on which might be most appropriate for your environment, see Developing Custom Java Step Processors - Applications vs. Applets. Note that all Step Processors must, at a minimum, perform certain basic operations. For information on these operations, see Basic Step Processor Operations. If your environment requires integration with an outside or legacy system or application, such as SAP, Siebel, PeopleSoft, etc., you may wish to use the Process Engine EAI Connector to interface and to retrieve objects for Step Processor operations. For information on using the Process Engine EAI Connector, see Overview of FileNet Enterprise Application Integration (EAI) for the Process Engine.

 

Developing an HTML Step Processor

Developing a custom HTML Step Processor involves using the Web Application Toolkit and/or developing your own JSP pages, JavaBeans, servlets, modifying the XML schema, using the Process Java APIs to log in to the Process Engine and establish a session, etc. As previously indicated, the advantages of an HTML Step Processor over a Java Step Processor are that the HTML Step Processor requires no download to the client and that it can be readily accessed by most standard browsers (e.g., Internet Explorer, Netscape, etc.). Note that all Step Processors, whether HTML or Java, must at a minimum, perform certain basic operations. For information on what you can customize (and how) for an HTML Step Processor, see the What You Can Customize and How topic above. For information on the basic operations an HTML Step Processor performs, see the Basic Step Processor Operations topic.

For information on using the Web Application Toolkit and also general information on developing HTML web applications, see the Web Application Toolkit Developer's Guide. Basic sample web applications to help get you started with the Web Application Toolkit are also available on the FileNet P8 Documentation CD. In addition, the FileNet eXtra Web site provides a sample HTML Step Processor which you can download, as well as other samples that illustrate a range of Web Application Toolkit functionality.

If your environment requires integration with an outside or legacy system or application, such as SAP, Siebel, PeopleSoft, etc., you may wish to use the Process Engine EAI Connector (in conjunction with your own or the FileNet-supplied IBM CrossWorlds InterChange Server) to retrieve objects, etc.; for information, see the Overview of FileNet Enterprise Application Integration (EAI) for the Process Engine.

Developing a Java Step Processor

Developing a Java Step Processor or Launch Step Processor involves a number of considerations and planning decisions, such as, what the application is to accomplish, what the user interface should look like, what resources are to be provided to the user, whether to deploy the Step Processor as a Java application or applet (and what are the pros and cons of each), what objects need to be provided as work items, whether to customize the Step Processor by extending the 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, whether to use any of the techniques to optimize application performance (see Optimizing Process API Usage), whether to use the Process Engine EAI Connector (in conjunction with the FileNet-supplied IBM CrossWorlds InterChange Server) to integrate with an existing or legacy system or application, and so on.

The following subtopics in this section provide guidelines on these decisions and on developing a custom Java Step Processor, as follows:

Back to top