LPS-36904

Hey Jorge,

I am not sure you still have time to review this change, so please feel free to forward it either to Mike or Julio. The change is really easy, I introduced a status check at 2 places: on the dynamic query when we generate prepare count and perform action queries to prevent to fetch unnecessary elements, and to the base staged model data handler export to make sure one more time before the export (because of the dependencies) we are doing the right thing. I added one small generalization, so it is possible to define more then just one workflow status per entity which is allowed to make sure the API is flexible enough and to support the current logic of JournalArticle. I also added some tests to prevent future mistakes. 

cc'-ing: @mhan810

Thanks,
Daniel