为工作安排指定缺省时区

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-01-20 10:38
传统:
IBM® Process Portal中,您为用户的工作调度或活动到期时间指定的时区用于计算流程和活动的到期日期。 如果未指定时区,则将中部标准时区用作缺省时区。 不过,您可以在 IBM Workflow ServerWorkflow Center 或两个环境中的 100Custom.xml 文件中应用自定义默认值。

关于本任务

工作调度的缺省时区在 99Local.xml 文件的 default-work-schedule 元素中定义。 您可以使用 tw.system.defaultTimeZone JavaScript API 字符串来进行检索。 要定制缺省时区,您可以通过将以下条目添加到 100Custom.xml 文件来覆盖缺省值。
<server>
   <default-work-schedule>         
        <time-zone merge="replace">time_zone_identifier</time-zone>     
   </default-work-schedule>
</server>
重要信息: 请使用明确的时区标识 (例如 America/ChicagoEurope/Berlin) ,而不是使用不推荐使用的三字母时区缩写 (例如 CSTMEZ)。

过程

要一致可靠地更新 Business Automation Workflow 部署环境中所有 100Custom.xml 文件中的工作调度的时区设置,请完成以下步骤:

  1. 停止 Workflow ServerWorkflow Center的服务器。
  2. 以断开连接方式启动脚本编制客户机,如 updateBPMConfig 命令 主题中所述。
  3. 运行以下命令以同时更新所有受影响的服务器:
    wsadmin> AdminTask.updateBPMConfig( [ '-create', '/server' ] )
    wsadmin> AdminTask.updateBPMConfig( [ '-create', '/server/default-work-schedule' ] )
    wsadmin> AdminTask.updateBPMConfig( [ '-create', '/server/default-work-schedule/time-zone', '-xNodeValue', time_zone_identifier ] )
    wsadmin> AdminConfig.save()
    使用需要的时区替换 time_zone_identifier。 例如,要将工作调度的缺省时区设置为 Chinese Standard Time 使用 Asia/Shanghai 作为时区标识。
    注意:如果您使用的默认时区与您的系统时区不同,那么在计算到期日期或使用 JavaScript tw.system.calculateBusinessDate() 方法计算业务日期时,您可能会得到意想不到的结果。
  4. 重新启动服务器。

结果

更新 100Custom.xml 文件的首选方式是运行 updateBPMConfig 命令。 但是,如果更新不成功,您可以按照创建 100Custom.xml 配置文件中的步骤手动更新文件。