We are facing an issue with WorkflowStatus api to get current wf status of a resource.
It works fine when we start a workflow and get running status it return true but when we deploy our code again even though workflow still in running condition ,the api returns us as false.
This issue only happening if we redeploy our code.
Any idea what can cause this issue ?? What is happening during bundle deployment which makes this api return status as false even though workflow still running ??
I tried with resource.adaptTo(WorkflowStatus.class).getWorkflows(true).isEmpty(); to check if its part of any workflow but this one also return me with an empty list.
As soon as i send page for workflow these methods returns correct status but if i deploy the code after workflow started these are sending me false status, any idea why ??/