I query for historic process instances by key via REST this way: POST query/historic-process-instances { "processDefinitionKey" : "myProcessKey" } and it works perfect! The question is that if I reload the deployment (deleting and creating a new one) then the historic returns no processes even though the key hasn't changed.
Did you delete the deployment with cascade? If so, all will be removed. Whats the reason for deleting the deployment? There are generally not many reasons for doing so.
Thanks Joram! I delete the deployment using: DELETE repository/deployments/{deploymentId} does this mean with cascade? I am doing so because I am making some adjustments in the xml and I reload it often, but I'd like to keep seeing previous processes. In fact, I can get them if I query the history the same way: query/historic-process-instances but posting some process variables. So they are there although asking by processDefinitionKey returns no processes.
>I am doing so because I am making some adjustments in the xml and I reload it often, but I'd like to keep seeing previous processes.
Then you don't need the delete: if you deploy a process definition with the same id again, all your process instance just stay where they were, and new instances will be created with the newly deployed process definition.