As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Try to get the RootProcessInstance and then you should get or set parameters from there:
ExecutionEntity yourCurrentExecutionEntity = (ExecutionEntity) execution; ExecutionEntity processInstance = (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findById(yourCurrentExecutionEntity.getRootProcessInstanceId());