It's all about the answers!

Ask a question

Build forge java api (RAM Policy), State History policy message information

Gerald Gordon (7011419) | asked Jul 27 '13, 9:19 a.m.

I need to access policy result message information.  After debugging the RAMStateHistory class I can see the message information that I need, but its not visible in the provided RAMStateHistory, this message information provieds a build_tag information that I need to access via a java program. Trying not to use reflection..

See my picture attached.  I'm trying to get the embedded value: fStateHistory->PolicyResults->elementData->message="<a href = Launched project JavaDeploy etc.....  Build_45</a>..."

Thank you in advance,


Accepted answer

permanent link
Rich Kulp (3.6k38) | answered Jul 29 '13, 11:47 a.m.
I'm sorry but that just isn't exposed in the Java API. You'll need to use introspection to the get state history. There is a method to get the internal state history but it is protected to the Java API package.

The only other way is through HTTP Rest calls, but that is overhead you don't want to add if you are already using the Java API for other reasons.
Gerald Gordon selected this answer as the correct answer

Gerald Gordon commented Jul 29 '13, 11:54 a.m.

 OK I used java reflection and got what I needed.  Do I need to put in a bug or enhancement request/ is this already in the pipleline?

Kind regards,

Rich Kulp commented Jul 29 '13, 12:24 p.m.

There has no request for this before. So it is not in the pipelines. The state history is considered to be internal so even if it can be retrieved it is not guarantied  to not change shape in the future.

Your answer

Register or to post your answer.