BEA Logo BEA WebLogic Process Integrator Release 2.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WebLogic Process Integrator Documentation   |   Programming Client Applications   |   Previous Topic   |   Next Topic   |   Contents   |   Index

WebLogic Process Integrator API Development

 

This section provides an overview of application development using the BEA WebLogic Process Integrator API, including the following topics:

 


Introduction

The BEA WebLogic Process Integrator, consisting of the process engine (or server), Studio design client, and Worklist run-time management client, provides the basic framework for designing, executing, and monitoring business processes, and administering related data.

In addition to using the design and run-time management clients provided with WebLogic Process Integrator, you can create custom clients to manage your business processes, and/or enhance the existing set of user interface features using the WebLogic Process Integrator application programming interface (API).

This document describes how to use the WebLogic Process Integrator API to create custom configuration, design, run-time management, or monitoring clients. For more information about the API, see the WebLogic Process Integrator javadoc.

Note: For an overview of the business process model, and details about using the WebLogic Process Integrator Studio client interface to administer, design, and monitor business processes, see Using the BEA WebLogic Process Integrator Studio.

For details about using the WebLogic Process Integrator Worklist client interface to execute business processes, see Using the BEA WebLogic Process Integrator Worklist.

 


WebLogic Process Integrator Process Engine

The following figure illustrates the WebLogic Process Integrator processing model.

Figure 1-1 WebLogic Process Integrator Processing Model


 

Note: For a complete description of the WebLogic Process Integrator processing model, see Using the BEA WebLogic Process Integrator Studio.

In the previous figure, the left column illustrates how to start (or instantiate) a business process or interact with an existing business process. Business processes can be started in several ways: in response to an XML event, as a time-based event, through manual calls, through calls from other business processes, or through a plug-in interface.

The right column shows how to integrate a JMS application, EJB component, Java class, or other application with the business process.

The database store, shown at the bottom of the figure, stores templates, template definitions, and run-time instances. You can create the templates and template definitions, and monitor the run-time instances using the WebLogic Process Integrator Studio client or a custom design client.

Note, at the heart of the WebLogic Process Integrator is the process engine, which serves as the controller for the run-time instances; it manages their execution and monitors their progress.

WebLogic Server Infrastructure

The WebLogic Process Integrator, including its process engine, runs on BEA WebLogic Server and takes advantage of the Java 2 Platform, Enterprise Edition (J2EE) services listed in the following table. For more information about WebLogic Server services, see Introduction to the BEA WebLogic Server, in the BEA WebLogic Server document set, available at the following URL:

http://download.oracle.com/docs/cd/E13222_01/wls/docs60/intro/index.html

Table 1-1 WebLogic Server Services Used By WebLogic Process Integrator

Service

Description

Enterprise JavaBean (EJB)

Provides lifecycle management and services such as caching, persistence, and transaction management. The WebLogic Process Integrator process engine consists of a combination of session and entity EJBs. For more information, see WebLogic Process Integrator Process Engine. In addition, message-driven beans are used for providing asynchronous messaging services.

Security Realm

Supports security interfaces including principals, groups, ACLs, and permissions. The WebLogic Process Integrator builds on the WebLogic Server security realm. WebLogic Process Integrator roles map to WebLogic Server security groups, and users, to the WebLogic Server users.

Web server

Supports Web browsers and other custom design and run-time management clients that use HTTP, servlets, and JSPs.

Java Naming and Directory Service (JNDI)

Supports directory service functionality.

Java Database Connectivity (JDBC)

Supports Java database connectivity and persistence. WebLogic Process Integrator uses JDBC for persisting all of its data.

Messaging

Implements the Java Message Service (JMS), including the transmission of XML content. WebLogic Process Integrator uses JMS for communicating worklist, time, and event notifications, and error and audit messages. For more information, see Establishing JMS Connections.

Clustering

Supports scalability and high-availability by grouping multiple servers together in a way that is transparent to application developers and end users. WebLogic Process Integrator takes advantage of clustering. To ensure data integrity and idempotence, you specify a unique transaction ID, as described in the context of the applicable methods later in this document.

Time Services

Builds on the services provided by WebLogic Server to support timed events and other timer-based activities.


 

Process Engine Component Architecture

The WebLogic Process Integrator process engine consists of the following components:

The architecture of the WebLogic Process Integrator process engine, including client and JMS interactions, is illustrated in the following figure.

Figure 1-2 Process Engine Component Architecture


 

Note the following in the previous figure:

The following sections describe the WebLogic Process Integrator components in more detail.

Session EJBs

Session EJBs provide application services to clients upon request. The WebLogic Process Integrator session EJBs provide the primary interface to the process engine.

The following table summarizes the functions of the WebLogic Process Integrator session EJBs, which are accessible to client applications via the WebLogic Process Integrator API (except where noted). It also indicates whether each EJB is stateful or stateless.

Table 1-2 Session EJBs

Session EJB

Description

EJB Type

com.bea.wlpi.server.admin.Admin

Provides the primary interface for design clients, including Studio and custom design clients.

Stateful

com.bea.wlpi.server.audit.Audit

Sends audit and error output to WebLogic JMS.

Stateless

com.bea.wlpi.server.catalog.EJBCatalog

Catalogs EJBs deployed on WebLogic Server.

Stateful

com.bea.wlpi.server.idgenerator.IDGenerator1

Generates unique IDs for various WLIP system object classes. (For internal use only.)

Stateless

com.bea.wlpi.server.notify.Notifier1

Supports JMS queue and publishing services. (For internal use only.)

Stateless

com.bea.wlpi.server.permission.Permission

Supports getting and setting user and role permissions.

Stateless

com.bea.wlpi.server.plugin.PluginManager

Provides run-time management of plug-ins during workflow execution.

For more information about programming plug-ins, see Programming BEA WebLogic Process Integrator Plug-Ins, on the BEA Developer Center, available at the following URL:

http://developer.bea.com

Stateless

com.bea.wlpi.server.plugin.PluginManagerCfg

Provides configuration- and design-time support and management of plug-ins.

For more information about programming plug-ins, see Programming BEA WebLogic Process Integrator Plug-Ins, on the BEA Developer Center, available at the following URL:

http://developer.bea.com

Stateless

com.bea.wlpi.server.serverproperties.ServerProperties

Supplies WebLogic Process Integrator server properties.

Stateless

com.bea.wlpi.server.principal.WLPIPrincipal

Links WebLogic Process Integrator to WebLogic Server security realms.

Stateless

com.bea.wlpi.server.workflowprocessor.WorkflowProcessor1

Provides the main interface to the process engine.

Stateful

com.bea.wlpi.server.worklist.Worklist

Provides the primary interface for run-time management clients, including Worklist and custom run-time management clients.

Stateful

com.bea.eci.repository.ejb.XMLRepository

Provides access to the XML repository database.

Stateless

1

Not available to the WebLogic Process Integrator API.


 

Stateful session EJBs are available to a client for the duration of a session, until the client releases the resource.

Stateless session EJBs, on the other hand, are a shared commodity. That is, a particular EJB can be accessed by multiple clients; there is no guarantee that the same EJB will be used by the process engine to handle multiple method calls to the EJB. Stateless session EJBs facilitate clustering, as subsequent method calls can be handled by different instances of an EJB on one or more servers.

For more information about the session EJBs available via the WebLogic Process Integrator API, see WebLogic Process Integrator API.

Entity EJBs

Entity EJBs represent data objects and include state information.

The WebLogic Process Integrator entity EJBs are not accessible directly through the WebLogic Process Integrator API; however, the com.bea.wlpi.common package provides classes for obtaining state information. For more information about the com.bea.wlpi.common package, see Client/Server Common Package.

The following table describes the WebLogic Process Integrator entity EJBs.

Table 1-3 Entity EJBs

Entity EJB

Description

com.bea.wlpi.server.businesscalendar.BusinessCalendar

Defines business-oriented time-calculations.

com.bea.wlpi.server.businessoperation.BusinessOperation[RO,RW]

Defines user-defined EJB or Java class actions.

Two implementations of this EJB are maintained for performances purposes: a read-write implementation used during configuration and design, and a read-only implementation used during runtime.

com.bea.wlpi.server.eventkey.EventKey[RO,RW]

Defines event key expressions for filtering events.

Two implementations of this EJB are maintained for performances purposes: a read-write implementation used during configuration and design, and a read-only implementation used during runtime.

com.bea.wlpi.server.reroute.Reroute

Defines task rerouting for users at predetermined time intervals.

com.bea.wlpi.server.template.Template[RO,RW]

Provides design-time representation of a workflow template. Used at run time to create a running instance.

Two implementations of this EJB are maintained for performances purposes: a read-write implementation used during configuration and design, and a read-only implementation used during runtime.

com.bea.wlpi.server.template.TemplateDefinition[RO,RW]

Provides design-time representation of a workflow template definition. Used at run time to create a running instance.

Two implementations of this EJB are maintained for performances purposes: a read-write implementation used during configuration and design, and a read-only implementation used during runtime.

com.bea.wlpi.server.instance.WorkflowInstance

Provides run-time representation of a workflow instance.


 

Startup Classes

The following table describes the WebLogic Process Integrator startup classes.

Table 1-4 Startup Classes

Startup Class

Description

com.bea.wlpi.server.timeprocessor.TimeProcessor

Manages timed events (wlpiTimer). Used with the TimeListener message-driven bean.

com.bea.wlpi.server.wlpiinit.WLPIInit

Initializes WebLogic Process Integrator. Used with the InitListener message-driven bean.


 

Message-Driven Beans

The following table describes the WebLogic Process Integrator message-driven beans.

Table 1-5 Message-Driven Beans

Message-Driven Bean

Description

com.bea.wlpi.EventQueue

JMS destination for event messages.

com.bea.wlpi.server.initlistener.InitListener

Initializes WebLogic Process Integrator. Used with the WLPIInit startup class.

com.bea.wlpi.server.timelistener.TimeListener

Manages timed events (wlpiTimer). Used with the TimeProcessor startup class.

com.bea.wlpi.server.topicrouter.TopicRouter

Supported for backward compatibility with pre-2.0 WebLogic Process Integrator software releases.

Reroutes all messages sent to the wlpiEvent JMS topic, which is not supported by Release 2.0, to the EventQueue message-driven bean, which handles messages for the newly-supported EventQueue queue. For more information about the JMS queues and topics, see Establishing JMS Connections.

Note: Although you are not required to do so, you may consider updating your code to use the eventQueue JMS queue (com.bea.wlpi.EventQueue) in place of the wlpiEvent JMS topic to expedite the transmission of messages.


 

 


WebLogic Process Integrator API

The WebLogic Process Integrator API consists of nine EJBs (summarized in the table Session EJBs) and the following seven packages:

The IDGenerator, Notifier, and WorkflowProcessor EJBs are not included in the WebLogic Process Integrator API.

The API components are described in more detail in the following sections. For additional information, see the WebLogic Process Integrator javadoc. For information about interfacing with the API session EJBs, see Connecting to WebLogic Process Integrator.

Admin Session EJB

The com.bea.wlpi.server.admin.Admin session EJB is a stateful EJB that serves as the primary interface for design clients, including the Studio and custom design clients.

Using the public methods provided by the Admin EJB, you can:

Audit Session EJB

The com.bea.wlpi.server.audit.Audit session EJB is a stateless EJB that encapsulates a WebLogic JMS topic (wlpiAudit) to which the process engine sends audit and error messages on behalf of clients. The Audit EJB also encapsulates access to the wlpiError topic, to which error messages are sent. Users define audit entries via task actions when designing workflow template definitions, as described in Using the BEA WebLogic Process Integrator Studio.

The audit messages consist of an XML document that conforms to the format defined in the Audit DTD. For more information about the Audit DTD format, see Audit DTD or the WebLogic Process Integrator javadoc.

Audit information (Info) and error (Error) messages are sent to the WebLogic Server log file, using the subsystem name WLPI.

For more information about setting up a JMS connection to the wlipAudit and wlpiError JMS topics, see Establishing JMS Connections.

EJBCatalog Session EJB

The com.bea.wlpi.server.catalog.EJBCatalog session EJB is a stateful EJB that classifies the EJBs deployed on a particular server. The EJBCatalog session EJB scans the JNDI tree, collects the EJB metadata, and stores it in a catalog. The EJBCatalog is used by design clients to define business operations.

Using the public methods provided by the EJBCatalog EJB, you can:

Permission Session EJB

The com.bea.wlpi.server.permission.Permission session EJB is a stateless EJB that enables you to get and set security permissions pertaining to both role and user actions.

PluginManager Session EJB

The com.bea.wlpi.server.plugin.PluginManager session EJB is a stateless EJB that provides run-time management of plug-ins during workflow execution.

For more information about programming plug-ins and the PluginManager EJB, see Programming BEA WebLogic Process Integrator Plug-Ins, on the BEA Developer Center, available at the following URL:

http://developer.bea.com

PluginManagerCfg Session EJB

The com.bea.wlpi.server.plugin.PluginManagerCfg session EJB is a stateless EJB that enables you to manage the implementation of user-defined plug-ins.

For more information about programming plug-ins and the PluginManager EJB, see Programming BEA WebLogic Process Integrator Plug-Ins, on the BEA Developer Center, available at the following URL:

http://developer.bea.com

ServerProperties Session EJB

The com.bea.wlpi.server.serverproperties.ServerProperties session EJB is a stateless EJB that enables clients to obtain information about the properties governing the current WebLogic Process Integrator software.

Using the public methods provided by the ServerProperties EJB, you can get the following information:

WLPIPrincipal Session EJB

The com.bea.wlpi.server.principal.WLPIPrincipal session EJB is a stateless EJB that enables clients to interface with the WebLogic Server security realm and access WebLogic Process Integrator organizations, roles, users, and other security properties. WebLogic Process Integrator roles map to WebLogic Server security groups, and users, to the WebLogic Server users.

Using the public methods provided by the WLPIPrincipal EJB, you can configure, manage, and obtain information about the organizations, roles, and users that ensure secure access to the system.

Note: Information about roles and users beyond the WebLogic Server-specific information that is stored in the WebLogic Server security realm, is maintained in the WebLogic Process Integrator database.

Worklist Session EJB

The com.bea.wlpi.server.worklist.Worklist session EJB is a stateful EJB serving as the primary interface for run-time management clients, including Worklist and custom run-time management clients. The Worklist EJB enables interaction with running instances.

Using the public methods provided by the Worklist EJB, you can:

XMLRepository Session EJB

The com.bea.eci.repository.ejb.XMLRepository session EJB is a stateless EJB that provides access to the XML repository database.

Using the public methods provided by the XMLRepository EJB, you can:

Client Common Package

The com.bea.wlpi.client.common package provides common client-side classes used by a WebLogic Process Integrator client. This package includes classes for:

Client Utility Package

The com.bea.wlpi.client.util package provides two JMS utilities, JMSTest and JMSTestAddr, for testing the publish and subscribe features of a JMS topic.

Client/Server Common Package

The com.bea.wlpi.common package provides common classes used by both the WebLogic Process Integrator client and the process engine. The package includes:

Package members can be serialized to facilitate the exchange of information between the client and the server.

Plug-In Common Package

The com.bea.wlpi.common.plugin package provides common classes used when managing user-defined plug-ins.

For more information, see Programming BEA WebLogic Process Integrator Plug-Ins, on the BEA Developer Center, available at the following URL:

http://developer.bea.com

Security Common Package

The com.bea.wlpi.common.security package provides common classes used when defining security permissions. The package includes:

Utility Package

The com.bea.wlpi.util package provides general WebLogic Process Integrator utilities, including a utility for generating message-driven beans.

XML Repository Helper Package

The com.bea.eci.repository.helper package provides common classes used when accessing the XML repository. The package includes:

 


WebLogic Process Integrator Application Development Tasks

The WebLogic Process Integrator API enables users to accomplish the application development tasks described in the following sections.

Configuration

The WebLogic Process Integrator API, via the Studio client or a custom configuration client, enables users to configure:

Part II of this document, Configuration, describes how to perform each of these types of configuration tasks using the WebLogic Process Integrator API. For more information about the API, see the WebLogic Process Integrator javadoc.

Design

The WebLogic Process Integrator API, via the Studio client or a custom design client, enables users to perform the following types of design tasks:

Part III of this document, Design, describes how to perform each of these types of design tasks using the WebLogic Process Integrator API. For more information about the API, see the WebLogic Process Integrator javadoc.

Run-Time Management

The WebLogic Process Integrator API, via the Worklist client or a custom run-time management client, enables users to perform the following types of run-time management tasks:

Part IV of this document, Run-Time Management, describes how to perform each of these types of run-time management tasks using the WebLogic Process Integrator API. For more information about the API, see the WebLogic Process Integrator javadoc.

Monitoring

The WebLogic Process Integrator API, via the Studio client or a custom monitoring client, enables users to perform the following types of monitoring tasks:

Part V of this document, Monitoring, describes how to perform each of these types of monitoring tasks using the WebLogic Process Integrator API. For more information about the API, see the WebLogic Process Integrator javadoc.

Plug-In Development

The WebLogic Process Integrator API enables users to design and integrate custom plug-ins.

For more information, see Programming BEA WebLogic Process Integrator Plug-Ins, on the BEA Developer Center, available at the following URL:

http://developer.bea.com

 


WebLogic Process Integrator API Examples

The examples used throughout this document are excerpted from the WebLogic Process Integrator client examples provided with the software in the examples/api directory. The client examples include:

The client examples are described in detail in the following sections.

Command-Line Administration Example

WebLogic Process Integrator provides a command-line administration example that demonstrates the basic administration tasks that you might support in a custom command-line client. These tasks include:

The command-line administration example consists of one java file, CLAdmin.java, located in the examples/api/commandline directory. For information about how to compile and run this example, see the Readme.txt file in this directory.

Some of the examples presented in Part I, API Development Fundamentals, and Part II, Configuration, are excerpted from the command-line administration example.

Command-Line Studio Example

WebLogic Process Integrator provides a command-line studio example that demonstrates basic design tasks that you might support in a custom command-line client, including:

The command-line studio example consists of one java file, CLStudio.java, located in the examples/api/commandline directory. For information about how to compile and run this example, see the Readme.txt file in this directory.

Some of the examples presented in Part III, Design, are excerpted from the command-line studio example.

Command-Line Worklist Example

WebLogic Process Integrator provides a command-line worklist example that demonstrates the basic worklist management tasks that you might support in a custom command-line client. These tasks include:

The command-line worklist example consists of one java file, CLWorklist.java, located in the examples/api/commandline directory. For information about how to compile and run this example, see the Readme.txt file in this directory.

Some of the examples presented in Part IV, Run-Time Management, are excerpted from the command-line worklist example.

Command-Line SAX Parser Example

WebLogic Process Integrator provides a command-line SAX parser example that demonstrates how to parse client requests received from the WebLogic Process Integrator server. Specifically, this example illustrates how to:

The command-line SAX parser example consists of one java file, CLSaxParser.java, located in the examples/api/commandline directory. For information about how to compile and run this example, see the Readme.txt file in this directory.

Some of the examples presented in Part IV, Run-Time Management, are excerpted from the command-line worklist example.

JSP Worklist Example

WebLogic Process Integrator provides a Java Server Page (JSP) worklist example that demonstrates the basic run-time management tasks that you might support in a custom JSP-based client. The main component of this example is the worklist.jsp file, which provides the main interfaces to the JSP worklist.

The following table lists the tasks that are demonstrated by the JSP client, and identifies example files to view for more information.

Table 1-6 JSP Worklist Example

Task

Related Example Files

Logging on and connecting to WebLogic Process Integrator, and specifying a login, password, and URL.

For more information about connecting to WLPI, see Connecting to WebLogic Process Integrator.

logon.html, logon.jsp

Starting a workflow from the list of available workflow templates.

startworkflow.jsp

Getting tasks.

worklist.jsp

Executing tasks.

worklist.jsp

Parsing the response XML (responseParser). The responseParser implements a document handler with the SAX (Simple API for XML) parser, enabling the application to handle specific events as they occur within the XML document.

For more information about parsing XML, see the XML.com Web site supported by O'Reilly & Associates, Inc. at the following URL: http://www.xml.com

ResponseParser.java

Responding if input is required to set variables (query.jsp) or acknowledge a message (message.jsp).

query.jsp, message.jsp

Reassigning a task to a different user or role.

reassign.jsp

Marking a task as done or undone.

worklist.jsp

Setting task properties to control the run-time characteristics of a running instance.

taskproperties.jsp

Logging out and disconnecting from WebLogic Process Integrator.

For more information about disconnecting, see Disconnecting from WebLogic Process Integrator.

logoff.jsp


 

The following figure shows the main JSP interface, worklist.jsp.

Figure 1-3 Main Interface to the JSP Worklist


 

For information about this example, see the Readme.txt file in the WebLogic Process Integrator examples/api/jsp directory.

Some of the examples presented in Part IV, Run-Time Management, are excerpted from the JSP worklist example.

 

back to top previous page next page