History for variables in inputs\outputs blocks

Hi all!
How can I get variables from the camunda history from Inputs\Outputs blocks in a Script task using java api?