简体   繁体   English

在Guidewire PC中获取无法更改锁定的分支异常

[英]Getting Cannot change locked branch exception in Guidewire PC

I am trying to make a readonly entity to writable by using 我试图通过使用使只读实体可写

Transaction.runwithNewBundle(\bundle -> {
   entity = bundle.add(entity)
})

but I am getting 但我越来越

java.lang.IllegalArgumentException: You cannot change a locked branch.

Please help me out with this. 这个你能帮我吗。

I got it resolved. 我解决了。 Guidewire provides one field in entity called "Locked". Guidewire在实体中提供了一个称为“锁定”的字段。 If it is set to true, the entity cannot be modified even in the Transaction.runwithNewBundle scope.Set it to false to resolve the exception. 如果将其设置为true,则即使在Transaction.runwithNewBundle范围内也无法修改该实体。将其设置为false可解决该异常。

That's not really the best idea. 那真的不是最好的主意。 You are trying to edit a branch (policyPeriod) that is essentially in a “thou shall not change” state. 您正在尝试编辑一个基本上处于“您不得更改”状态的分支(policyPeriod)。 If the branch is bound or quoted and you modify it it's likely you are at least invalidating the quote. 如果分支是绑定的或带引号的,并且您对其进行了修改,则可能至少使引号无效。 I'd highly recommend NOT modifying a locked branch. 我强烈建议您不要修改锁定的分支。 Instead open it for edit first (if you can) 而是先打开它进行编辑(如果可以)

Simple! 简单! You cannot edit a branch that is Locked (Quoted or Bound). 您不能编辑处于锁定状态(引用或绑定)的分支。 Click on "Edit Policy Transaction", bring back the status to Draft. 单击“编辑策略事务”,将状态恢复为草稿。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM