I noticed almost the same behavior but, in my case, the variable gets duplicated. What I mean is that after executing a method in the class I end up with TWO variables with the same name (in your case invoice), one containing the new value and the new one (also called invoice but with a higher Id) containing the same value of the original invoice.
Have you seen something like that?
Thanks in advance,
Second question answered here (please don't double-post):
First question (not really related) is more a question for the jBPM team, about what are the dirty-checking semantics for jBPM variables. It matters what exactly an Invoice is, btw, and how you get it Converted to something that jBPM can persist.
Sorry for double posting (desperation superseded manners). I have been trying different approaches for thee days.