It's all about the answers!

Ask a question

How to Overwrite Calculated Value with Plain Java API


Kurtulus YILDIRIM (68716) | asked Sep 28, 1:43 p.m.

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


permanent link
Ralph Schoon (59.4k23642) | answered Sep 29, 2:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 29, 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

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

Ralph, Thank you for your answer.

Your answer


Register or to post your answer.