Hi Khaled,
There is another way you could try
processEngine.execute(new Command() {
public Object execute(Environment env) {
executionImpl.createVariable("test", "valuetest",
"string", false);
Variable variable = executionImpl.getVariableObject(
"test");
HistoryEvent.fire(new VariableCreate(variable));
return null;
}
});
I think the history variable of jBPM4 is so weak. If you want to store some history variable for process instance, you should use your own table.