您在此处:
InsClaimService:invokeProductRules
在索赔流中使用此服务,以调用您添加到产品的承保规则。
例如,如果您添加了将超过特定金额的索赔发送给承保人以待批准的规则,则此服务会调用这些规则。
工作原理
- 服务根据
objectID查找索赔对象,并根据该objectID提取该对象的产品。 - 查找指定的
transitionName。 - 运行与产品关联并适用于
transitionName的规则。为每个索赔产品规则分别评估每个涉及方实例和/或涉及的财产实例。
- 如果任何规则评估为真,服务将执行这些规则中指定的 Vlocity 操作。
例如,如果操作指定创建任务,服务会创建任务。
- 查找
includeStateTransition选项的值。如果值 =true,服务会查找此对象的状态模型,查找fieldAPIName值,并根据转换更改该值。 - 输出每个相关方和/或相关财产实例上每个规则的评估结果。
远程选项
选项 |
说明 |
|---|---|
|
如果为真,服务会将状态模型 如果为假,服务不会进行任何状态转换。 |
|
要查询的索赔 ID 或索赔范围 ID。 |
|
与您想要运行的规则关联的状态转换名称。 该服务将仅运行与您指定的 要查找迁移名称,请转到此对象的状态模型。 |
|
如果
如果 |
|
可选。 当服务运行的所有规则评估为假时,服务将对象转换为的状态。 仅在 |
输出 JSON
该服务会返回每个涉及房地产和/或涉及方实例的规则评估。
对于本示例,输入是:
-
objectId = claimId
-
transitionName = 规则转换名称
{
"stateTransit": " updated ClaimStatus__c from Open to Closed",
"canTransitState": true,
"allFalse": false,
"falseRules": {
"Involved Property_a3lf4000000pcFUAAY": [
{
"ruleDetails": {
"instanceKey": "Involved Property_a3lf4000000pcFUAAY",
"involvedItemId": "a3lf4000000pcFUAAY",
"requirement name": "Maximum Aggregation Rule",
"conditions": "Pet.petType == 'dog' AND Pet.petBreed == 'Alaskan Husky' AND ptandev2__InsuranceClaim__c.ptandev2__ClaimStatus__c == 'Open'",
"message": "TestMessage",
"action method": "Product_Rule",
"action class": "IntegrationProcedureService",
"productId": "01tf4000004mGyhAAE",
"transitionName": "OpenToClosed",
"objectId": "a3qf4000000KtfKAAS"
}
}
],
"Involved Injury Cat Husky_a3kf4000000pLEuAAM": [
{
"ruleDetails": {
"instanceKey": "Involved Injury Cat Husky_a3kf4000000pLEuAAM",
"involvedItemId": "a3kf4000000pLEuAAM",
"requirement name": "Maximum Aggregation Rule",
"conditions": "Pet.petType == 'dog' AND Pet.petBreed == 'Alaskan Husky' AND ptandev2__InsuranceClaim__c.ptandev2__ClaimStatus__c == 'Open'",
"message": "TestMessage",
"action method": "Product_Rule",
"action class": "IntegrationProcedureService",
"productId": "01tf4000004mGyhAAE",
"transitionName": "OpenToClosed",
"objectId": "a3qf4000000KtfKAAS"
}
}
]
},
"trueRules": {
"Involved Injury Dog Husky_a3kf4000000pLEtAAM": [
{
"actionResults": {
"IPResult": {
"output": "TestOutput"
}
},
"ruleDetails": {
"instanceKey": "Involved Injury Dog Husky_a3kf4000000pLEtAAM",
"involvedItemId": "a3kf4000000pLEtAAM",
"requirement name": "Maximum Aggregation Rule",
"conditions": "Pet.petType == 'dog' AND Pet.petBreed == 'Alaskan Husky' AND ptandev2__InsuranceClaim__c.ptandev2__ClaimStatus__c == 'Open'",
"message": "TestMessage",
"action method": "Product_Rule",
"action class": "IntegrationProcedureService",
"productId": "01tf4000004mGyhAAE",
"transitionName": "OpenToClosed",
"objectId": "a3qf4000000KtfKAAS"
}
}
]
}
}
此 JSON 包括以下键/值对:
关键字 |
值 |
|---|---|
|
描述服务在索赔对象的状态字段中的变化。 |
|
表示服务是否将对象转换为新状态。 |
|
如果服务运行的所有规则评估为假, 如果服务运行的任何规则评估为真, |
|
一个或多个 包括评估为假的服务运行的所有规则。 |
|
一个或多个 包括由服务运行的评估为真的所有规则。 仅在 |
|
服务遇到的任何错误。 如果值正常,UI 上不会出现错误消息。 |
falseRules 和 trueRules 数组都包含 ruleDetails 键/值对。
"ruleDetails": {
"instanceKey": "Involved Property_a3lf4000000pcFUAAY",
"involvedItemId": "a3lf4000000pcFUAAY",
"requirement name": "Maximum Aggregation Rule",
"conditions": "Pet.petType == 'dog' AND Pet.petBreed == 'Alaskan Husky' AND ptandev2__InsuranceClaim__c.ptandev2__ClaimStatus__c == 'Open'",
"message": "TestMessage",
"action method": "Product_Rule",
"action class": "IntegrationProcedureService",
"productId": "01tf4000004mGyhAAE",
"transitionName": "OpenToClosed",
"objectId": "a3qf4000000KtfKAAS"
}"ruleDetails": {
"requirement name": "Operator Points >4",
"conditions": "wcOperator.opPoints > 4",
"message": "The applicant's prior citations require underwriting review prior to issuance.",
"action method": "ReferToUnderwriting",
"action class": "DROpenImplementationClass",
"productId": "01tf4000001lKNQAA2",
"transitionName": "Submit>Underwrite",
"objectId": "0Q0f4000000ADatCAG"
}trueRules数组包括一个或多个actionResults、其他键/值对和rulesDetails。
actionResults是服务调用的 Vlocity 操作类和操作方法的输出。
"trueRules": {
"Involved Injury Dog Husky_a3kf4000000pLEtAAM": [
{
"actionResults": {
"IPResult": {
"output": "TestOutput"
}
},
"ruleDetails": {
"instanceKey": "Involved Injury Dog Husky_a3kf4000000pLEtAAM",
"involvedItemId": "a3kf4000000pLEtAAM",
"requirement name": "Maximum Aggregation Rule",
"conditions": "Pet.petType == 'dog' AND Pet.petBreed == 'Alaskan Husky' AND ptandev2__InsuranceClaim__c.ptandev2__ClaimStatus__c == 'Open'",
"message": "TestMessage",
"action method": "Product_Rule",
"action class": "IntegrationProcedureService",
"productId": "01tf4000004mGyhAAE",
"transitionName": "OpenToClosed",
"objectId": "a3qf4000000KtfKAAS"
}
}
]
}