开发为远程业务流程中的人工任务提供用户界面的 Portlet 带来了一些挑战。IBM WebSphere Portal 附带的“My Tasks”和“Task List”Portlet 对于某些场景很有用。如果需要为人工任务提供自定义用户界面,则开发人员必须确保运行时环境和 Portlet 实现是正确的。本文介绍为运行时环境安装所需的软件,开发 Portlet 应用程序,以及测试应用程序。示例代码包括业务流程应用程序、基本 Portlet 和协作 Portlet,这两个 Portlet 已在 WebSphere Portal V6.0.1 和 WebSphere Process Server V6.0.2 上进行了测试。
IBM® WebSphere ® 产品文档和多篇 developerWorks® 文章涵盖了本文中的一些信息。然而,这些文章未提供远程访问场景的所有关键设置和实现细节。本文收集这些信息和提供简单示例的目的旨在帮助读者在开发此类 Portlet 应用程序的过程中节约时间。
![]() |
|
本文重点介绍运行于 IBM WebSphere Portal 上的 Portlet 和运行于远程 IBM WebSphere Process Server 上的 Portlet 之间的通信。本演示附带的示例已在按如下方式安装的运行时环境中进行了测试:
- 对于 WebSphere Portal 安装:
- 安装 WebSphere Portal V6.0.0.0。允许 Portal 安装程序安装 WebSphere Application Server – 网络部署。请不要选择安装 WebSphere Process Server 的选项。该选项标有 Install business process support 并启用流程门户,这是在 WebSphere Process Server 上运行的 WebSphere Portal。请确保遵循产品文档中的详细安装步骤。
- 将 WebSphere Application Server 升级到 V6.0.2.17。Portal 安装程序安装 Application Server V6.0.2.9,但需要更高的级别。使用 Application Server 更新安装程序来安装更新。
- 将 WebSphere Portal 升级到 V6.0.1。从产品支持页面获取 6.0.1 更新。
- 安装 WebSphere Process Server Client 6.0.2。在安装程序中,选择使用现有 WebSphere Application Server 安装程序的选项,再选择门户使用的 Application Server。选择选项 Client Installation。客户端安装在 Application Server 的根目录下添加 ProcessChoreographer 目录,并将 Process Server API(包括用于人工任务的 taskapi.jar 文件)添加到 lib 目录。稍后,本文将讨论向 Portlet WAR 文件添加 API 存根。如果未安装 Process Server 客户端,则在您尝试运行 Portlet 应用程序时将发生大量 NoClassDefFoundExceptions。
- 安装 WebSphere Portal 6.0.1 修补程序。从支持页面下载 6.0.1 重要修补程序。
- 从 Portal bin 目录运行
WPVersioninfo
脚本以验证 Portal 版本是否为 V6.0.1.0。从 Application Server bin 目录运行versioninfo
脚本以验证 Application Server 是否为 V6.0.2.17,以及 WebSphere Process Server Client 是否为 V6.0.2.0。
- 对于远程 WebSphere Process Server,安装下列产品和升级:
本文转自IBM Developerworks中国