You are trying to access process instance aka execution that has been already completed. To be able to utilize executionService to get the variable process instance must be active. So add a wait state to the just after java activity so the process instance will not be completed