使用 Process Admin Console 迁移大量现行的流程实例

在使用 Process Admin Console 迁移大量现行流程实例时,Web 浏览器可能会因内存问题而崩溃或挂起。 服务器会将非常大的实例数据块返回至客户机浏览器。 但是,已引入可配置的属性 migrate-instances-count,允许您使用 Process Admin Console 来指定在单个迁移期间迁移的实例数。

关于此任务

虽然您可以使用 BPMMigrateInstances 命令来迁移大量流程实例,但是 migrate-instances-count 允许您使用 Process Admin Console 来限制要在单个迁移中迁移的实例数。 缺省值为 1000

如果想要更改设置的值,那么可以通过在 100Custom.xml 文件中添加或更新设置来覆盖该值。 例如,要将设置添加到 100Custom.xml 文件,您可以在 <properties> 元素下添加以下元素,并根据需要修改该值:
<server>
   <instance-migration merge="mergeChildren">
      <migrate-instances-count merge="replace">1000
      </migrate-instances-count>
   </instance-migration>
</server>

100Custom.xml 文件中启用此设置后,它将适用于 Process Admin Console 和 BPMMigrateInstances 命令。 在每个迁移之后,您应该检查 Process Inspector 以确定是否存在任何剩余的仍暂挂迁移的实例,然后对剩余实例执行另一个迁移。

有关需要更新的个别 100Custom.xml 文件及其位置的信息,请参阅主题100Custom 配置文件的位置

为了一致可靠地更改 IBM® BPM 部署环境中所有 100Custom.xml 文件中的设置值,建议您按以下过程中所述使用 updateBPMConfig 命令:

过程

  1. 停止 Process ServerProcess Center 的服务器。
  2. 按主题 updateBPMConfig 命令 中所述,在断开连接方式下启动脚本编制客户机。
  3. 运行以下命令可同时更新所有受影响的服务器:
    wsadmin> AdminTask.updateBPMConfig( [ '-create', '/server' ] )
    wsadmin> AdminTask.updateBPMConfig( [ '-create', '/server/instance-migration' ] )
    wsadmin> AdminTask.updateBPMConfig( [ '-create', '/server/instance-migration/migrate-instances-count', '-xNodeValue', 'instances_count' ] )
    wsadmin>AdminConfig.save()

    instances_count 变量替换为要在单个迁移中迁移的流程实例的数量。

  4. 重新启动服务器。

结果

更新 100Custom.xml 文件的建议方式是运行 updateBPMConfig 命令。 但是,如果更新未成功,您可以遵循主题 创建 100Custom.xml 配置文件 中的步骤手动更新文件。