Business Process Choreographer Explorer provides several JavaServer
Faces (JSF) components. You can extend and integrate these components to add
business-process and human-task functionality to Web applications.
Why and when to perform this task
You can use WebSphere® Integration Developer to build your Web
application.
Steps for this task
- Create a dynamic project and change the Web Project Features properties
of the Web project to include the Faces Base Components.
For
more information on creating a Web project, go to the information center for WebSphere Integration
Developer.
- Add the prerequisite Business Process Choreographer Explorer Java™ archive
(JAR files).
Add the following files to the
WEB-INF/lib directory
of your project:
- bpcclientcore.jar
- bfmclientmodel.jar
- htmclientmodel.jar
- bpcjsfcomponents.jar
In WebSphere Process Server, these files
are in the following directories:
- On Windows® systems: install_root\ProcessChoreographer\client
- On UNIX® and Linux® systems: install_root/ProcessChoreographer/client
- Add the EJB references that you need to the Web application deployment
descriptor, web.xml file.
<ejb-ref id="EjbRef_1">
<ejb-ref-name>ejb/BusinessProcessHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.ibm.bpe.api.BusinessFlowManagerHome</home>
<remote>com.ibm.bpe.api.BusinessFlowManager</remote>
</ejb-ref>
<ejb-ref id="EjbRef_2">
<ejb-ref-name>ejb/HumanTaskManagerEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.ibm.task.api.HumanTaskManagerHome</home>
<remote>com.ibm.task.api.HumanTaskManager</remote>
</ejb-ref>
<ejb-local-ref id="EjbLocalRef_1">
<ejb-ref-name>ejb/LocalBusinessProcessHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.ibm.bpe.api.LocalBusinessFlowManagerHome</local-home>
<local>com.ibm.bpe.api.LocalBusinessFlowManager</local>
</ejb-local-ref>
<ejb-local-ref id="EjbLocalRef_2">
<ejb-ref-name>ejb/LocalHumanTaskManagerEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.ibm.task.api.LocalHumanTaskManagerHome</local-home>
<local>com.ibm.task.api.LocalHumanTaskManager</local>
</ejb-local-ref>
- Add the Business Process Choreographer Explorer JSF components
to the JSF application.
- Add the tag libraries that you need for your applications to
the JavaServer Pages (JSP) files. Typically, you need the JSF
and HTML tag libraries, and the tag library required by the JSF components.
- <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
- <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
- <%@ taglib uri="http://com.ibm.bpe.jsf/taglib" prefix="bpe"
%>
- Add an <f:view> tag to the body of the JSP
page, and an <h:form> tag to the <f:view> tag.
- Add the JSF components to the JSP files.
Depending
on your application, add the List component, the Details component, the CommandBar
component, or the Message component to the JSP files. You can
add multiple instances of each component.
- Configure the managed beans in the JSF configuration file.
By default, the configuration file is the faces-config.xml file.
This file is in the WEB-INF directory of the Web application.
Depending on the component that you add to your JSP file, you also need to
add the references to the query and other wrapper objects to the JSF configuration
file.
- Implement the custom code that you need to support the JSF components.
- Deploy the application.
Map the EJB references to
the Java Naming
and Directory Interface (JNDI) names or manually add the references to the ibm-web-bnd.xmi file.
The
following table lists the reference bindings and their default mappings.
Table 1. Mapping of the reference bindings to JNDI namesReference binding |
JNDI name |
Comments |
ejb/BusinessProcessHome |
com/ibm/bpe/api/BusinessFlowManagerHome |
Remote session bean |
ejb/LocalBusinessProcessHome |
com/ibm/bpe/api/BusinessFlowManagerHome |
Local session bean |
ejb/HumanTaskManagerEJB |
com/ibm/task/api/HumanTaskManagerHome |
Remote session bean |
ejb/LocalHumanTaskManagerEJB |
com/ibm/task/api/HumanTaskManagerHome |
Local session bean |
Result
Your deployed Web application contains the functionality provided
by the Business Process Choreographer Explorer components.