How to Overwrite Calculated Value with Plain Java API
Hi,
I have an attribute in my process which is populated with a calculated value. Everything works as expected on that attribute via any client. I also needs to overwrite that attribute's value with an EWM's Plain Java API based utility. My utility also works as expected when the calculated value code is removed. However, the calculated value script overwrites my attributes value after I changed it via my Plain Java utility. Is there a way to disable calculated value scripts with Plain Java API?
Thank you in advance.
Accepted answer
Kurtulus, calculated values are always calculated when work items are opened in the UI, or dependent attributes change etc.
You can not prevent that. You can only apparently overwrite the calculated value, because the calculated value is not executed when the Plain Java Client Library runs against the work item. The only way you could prevent that from happening, would be to use another attribute that stores if the calculated value should overwrite or not. In the case it should not overwrite, the calculated value needs to return the current value of the attribute.