It's all about the answers!

Ask a question

How to Overwrite Calculated Value with Plain Java API

Kurtulus YILDIRIM (681121) | asked Sep 28 '21, 1:43 p.m.


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

permanent link
Ralph Schoon (63.3k33646) | answered Sep 29 '21, 2:29 a.m.
edited Sep 29 '21, 2:31 a.m.

 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.

Kurtulus YILDIRIM selected this answer as the correct answer

Kurtulus YILDIRIM commented Sep 29 '21, 2:43 a.m.

Ralph, Thank you for your answer.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.