使用解决方案数据同步案例
如果在部署解决方案之后对其进行了修改,请运行案例同步器实用程序来更新现有实例,以与您所做的更改相匹配。 您可以使用 命令或 Case Manager REST 协议运行该实用程序。
当您更改解决方案的案例类型并重新部署该解决方案时,这些更改将应用于新的案例实例。 这些更改不会应用于正在运行的案例实例。
使用案例同步器实用程序来更新案例实例,以匹配您对以下案例类型所做的更改:
- 创建新的文件夹结构
- 案例文件夹结构更改
- 添加到案例类型中的新活动
- 对与容器关联的子活动的容器活动(添加或删除)所作的更改
- 对活动启动方式的更改(手动、自动、自主、可恢复)
- 对活动必需状态的更改(必需,可选)
- 对活动组方式的更改(包含,排除)
案例同步器实用程序以批处理方式处理案例实例。 已处理的案例实例标识将存储在运行该工具的路径中的 casesynchronizer.processed 文件中。 如果批处理运行时没有任何错误,那么该工具将删除此文件。 如果在执行案例同步器实用程序期间发生错误,那么该工具将检查案例实例标识等。
案例同步器实用程序位于 IBM® Business Automation Workflow 安装文件夹中。| 平台 | 文件名 | 位置 |
|---|---|---|
| AIX® | caseSynchronizer.sh | /opt/IBM/CaseManagement |
| Linux® | caseSynchronizer.sh | /opt/IBM/CaseManagement |
| Linux for System z® | caseSynchronizer.sh | /opt/IBM/CaseManagement |
| Windows | caseSynchronizer.bat | C:\Program Files (x86)\IBM\CaseManagement |
语法
caseSynchronizer 命令 parameter-list
parameter-list 由一组名称/值对组成,其中每个对都有一个参数和一个值(用空格分隔)。
命令
- launch
- 启动案例同步器实用程序。 launch 命令需要使用参数。
- suspend
- 停止案例同步器实用程序。 suspend 命令不需要使用参数。
参数
- 必需:-cews_uri
- 用于连接到 Content Platform Engine的 Web Service URI ,例如 http: //myserver:9080/wsi/FNCEWS40MTOM。
- 必需:-username
- 用于连接到 Content Platform Engine的用户标识。
- 必需:-password
- 用于连接到 Content Platform Engine的指定用户标识的密码。 如果未指定密码,那么案例同步器实用程序会提示输入密码。
- 必需:-target_os
- 案例同步器检查的目标对象库。
- 必需:-caseType
- 要更新的工具的案例类型的符号名称。
- 可选: -caseTypeFilter
- 在检索要更新的案例实例时,将使用过滤条件。
- 可选: -includedTaskTypes
- 要添加到案例实例的活动类型符号名称的逗号分隔列表。
- 可选: -excludedTaskTypes
- 要在案例实例的更新中排除的活动类型符号名称的逗号分隔列表。
- 可选: -file
- 包含参数以运行该工具的输入文件的路径。
- 可选: -batchSize
- 一次检索并处理的项数。 如果未指定项数,缺省批处理大小为 1000 项。
- 可选: -threadPoolSize
- 当该工具处理案例实例时,可供其使用的活动线程数。 缺省值为 4。
示例
注: 引用案例对象的参数值必须使用符号名称。 符号名称值将应用于参数 -target_os, -caseType, -includedTaskTypes和 -excludedTaskTypes,并且在 -caseTypeFilter中使用属性名称。 在以下示例中,“ABC_AccidentReport”是案例类型的符号名称,“AccidentReport”和“ABC_VerifyData”是解决方案中某个活动任务的符号名称。
示例 1-3 中的命令:
示例 3:- 针对类型为“事故报告”的案例启动案例同步器
- 更新该案例类型的每个案例实例
- 更新对该案例类型所做的更改
caseSynchronizer launch -cews_uri http://myserver:9080/wsi/FNCEWS40MTOM
-username administrator -password mypassword
-target_os MyTargetOS -caseType 'ABC_AccidentReport'示例 2:caseSynchronizer launch -cews_uri http://myserver:9080/wsi/FNCEWS40MTOM
-username administrator -password mypassword -batchSize 2000
-target_os MyTargetOS -caseType ‘ABC_AccidentReport' -includedTaskTypes ABC_VerifyData, ABC_ProcessClaim它将批处理大小更改为 2000,并包含由案例同步器实用程序更新的活动类型的逗号分隔列表。caseSynchronizer launch -cews_uri http://myserver:9080/wsi/FNCEWS40MTOM
-username administrator -password mypassword -threadPoolSize 8
-target_os MyTargetOS -caseType 'ABC_AccidentReport' -excludedTaskTypes ABC_CheckCustomerData, ABC_ReportClaim它将 threadPoolSize 更改为 8,并包含由案例同步器实用程序排除或跳过的活动类型的逗号分隔列表。
示例 4:
以下命令使用包含实用程序的自变量的文件来启动案例的案例同步器。 输入文件中必须包含 cews_uri、username、password、target_os 和 caseType 参数。
示例 5:caseSynchronizer launch -file /home/user/input_case_synchronizer以下命令将暂挂案例同步器。
示例 6:caseSynchronizer suspend通过使用 -caseTypeFilter 参数,可以进一步过滤由案例同步器处理的案例实例数。 -caseTypeFilter 参数中的值可以基于任意案例实例属性。 此值将用作检索案例实例的搜索条件。
对于类型为“事故报告”且 isValidCustomer 属性设置为 true 并且 ClaimAmount 属性值大于或等于 100 的案例,以下命令将启动案例同步器。
caseSynchronizer launch -cews_uri http://myserver:9080/wsi/FNCEWS40MTOM
-username administrator -password mypassword -target_os MyTargetOS -caseType 'ABC_AccidentReport'
-caseTypeFilter '[ABC_isValidCustomer] = true AND [ABC_ClaimAmount] >= 100'针对案例同步器的 Case Manager REST 协议
您可以使用 Case Manager REST 协议来运行案例同步器。 以下示例是 POST 方法的 URI:
https://host_name:port_number/CaseManager/CASEREST/v1/casesynchronizer
请求内容
POST 方法的请求在主体内包含以下 JSON 参数:
{
"command" : "launch -Start the case synchronizer. Required.",
"suspend -Stop the case synchronizer.",
"cews_uri" : "The web services URI used to connect to Content Platform Engine. Required. For example: https://myserver:9080/wsi/FNCEWS40MTOM",
"username" : "The user ID used to connect to Content Platform Engine. Required.",
"password" : "The password for the specified user ID used to connect to Content Platform Engine. Required.",
"target_os" : "The target object store. Required.",
"caseType" : "The name of the case type for which the case synchronizer is to be run. Required. If the name of the case type includes spaces, surround the name with single quotation marks. For example: -caseType 'Accident report'",
"caseTypeFilter" : "The filter criteria to use when retrieving the case instances to update. This parameter is optional.",
"includedTaskTypes" : "A comma-separated list of the task type symbolic names to add to the case instances. This parameter is optional.",
"excludedTaskTypes" : "A comma-separated list of the task type symbolic names to exclude from the update to the case instances. This parameter is optional.",
"batchSize" : "The number of items to retrieve and process at one time. Optional. If not specified, the default batch size is 1000 items.",
"threadPoolSize" : "The number of active threads when processing activities. Optional. The default value is four threads."
}
值casesynchronizerresult在响应 JSON 中指示案例同步器是否成功运行。
注意:要使用 REST 协议运行病例同步器,必须在应用服务器上配置 FileNetP8WSI 的登录模块。
This topic is shared by BAW, CP4BA. Last updated on 2025-01-20 10:38