Because jasperreports by default only have a look at committed transactions and because we didn't want to print uncommitted documents the workflow activity wait-sleep was enabled to wait until the next commit. It is started by using a timeout of -1
patch is for 7.1
While this work, the proper way should be to add a new action value for “Post Transaction Commit” (Action_Post_Trasaction_Commit).
It is my concern with such hack, after a while, only person that can read code will know the existence of this feature.
My first idea was to implement a new code, too. The advantage of this solution that it will be taken up by the workflow processor automatically if by any reason it is not executed in line. Of course then it must be documented in the help text.
But using a new code is ok, also.