[jboss-user] [jBPM Users] - Re: Jbpm 4.2 how to enable variable history
xalperte
do-not-reply at jboss.com
Fri Nov 13 17:16:31 EST 2009
Sorry, I use format inside the Code block and it doesn't works....
This is the actual code: (ScopeInstanceImpl.createVariableObject), using isHistoryEnabled=true
| variable.setKey(key);
| variable.setExecution(getExecution());
| variable.setTask(getTask());
| variable.setHistoryEnabled(isHistoryEnabled); <------- true
| variable.setValue(value); <------- Fires the VariableUpdate event
|
| long dbid = DbidGenerator.getDbidGenerator().getNextId();
| variable.setDbid(dbid);
|
| if (isHistoryEnabled) { <------- true
| HistoryEvent.fire(new VariableCreate(variable)); <------- fires VariableCreate event
| }
|
and that the code I thing could work:
| variable.setKey(key);
| variable.setExecution(getExecution());
| variable.setTask(getTask());
| variable.setHistoryEnabled(false); <------- force false
| variable.setValue(value); <------- Now no VariableUpdate event will be fired
|
| long dbid = DbidGenerator.getDbidGenerator().getNextId();
| variable.setDbid(dbid);
|
| if (isHistoryEnabled) { <------- true
| HistoryEvent.fire(new VariableCreate(variable)); <------- fires VariableCreate event
| }
|
| variable.setHistoryEnabled(isHistoryEnabled); <------- true
|
I hope that helps.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265630#4265630
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265630
More information about the jboss-user
mailing list