-
1. Re: jBPM4 - Process Dehydration
kukeltje Aug 21, 2009 4:49 AM (in response to djcye)In jBPM 4, they are by default in the DB
-
2. Re: jBPM4 - Process Dehydration
djcye Aug 21, 2009 9:05 AM (in response to djcye)thx!
an additional noob question: the userguide explains that changes to variables have to be saved to the DB explicity.
in which cases i have to do this ?
(1) when i modify variables in an java node - inside the process ?
(2) when i modify variables in an eventlistener/handler - inside the process ?
(3) when i modify variables from outside ? (change variables over the services) -
3. Re: jBPM4 - Process Dehydration
kukeltje Aug 21, 2009 10:29 AM (in response to djcye)where in the userguide is that stated?
-
4. Re: jBPM4 - Process Dehydration
djcye Aug 21, 2009 11:06 AM (in response to djcye)"jBPM doesn't have a mechanism for detecting changes automatically to variable values. So if you get e.g. a serializable collection from the process variables and add an element, then you need to set the changed variable value explicitely for the changes to be saved to the DB. "
http://docs.jboss.org/jbpm/v4.0/userguide/html_single/#variables
or did i get it wrong ? -
5. Re: jBPM4 - Process Dehydration
kukeltje Aug 21, 2009 11:16 AM (in response to djcye)Yep, you got it wrong.... you have to SET it, not save it. pseudocode:
HashMap <String, String> var = service.getVariable("myVar");
var.put("additionalItem", "valueOfItem");
Then the processvariable in the engine is not updated.
You have to do
service.setVariable("myVar", var)
and that is with all variables, not just collections -
6. Re: jBPM4 - Process Dehydration
djcye Aug 21, 2009 11:41 AM (in response to djcye)thx for support, now i see =)
i realy would like to invite you to a beer ^^ -
7. Re: jBPM4 - Process Dehydration
kukeltje Aug 21, 2009 11:54 AM (in response to djcye)Beer? Definitely not tonight (even if you lived next door) since I still am not fully recuperated from last night.
So can I take a rain check? (where do you live?)