"</process-definition>"
);
processDefinition = saveAndReload(processDefinition);
ProcessInstance processInstance = new ProcessInstance(processDefinition);
ContextInstance contextInstance = processInstance.getContextInstance();
contextInstance.setVariable("a", "value a");
contextInstance.setVariable("b", "value b");
processInstance.signal();
jbpmContext.save(processInstance);
commitAndCloseSession();
SchedulerThread schedulerThread = new SchedulerThread(jbpmConfiguration);
schedulerThread.executeTimers();
beginSessionTransaction();
processInstance = jbpmContext.loadProcessInstance(processInstance.getId());
contextInstance = processInstance.getContextInstance();
assertEquals("value a", contextInstance.getVariable("a") );
assertEquals("value b updated", contextInstance.getVariable("b") );
TaskInstance taskInstance = (TaskInstance) processInstance.getTaskMgmtInstance().getTaskInstances().iterator().next();
assertEquals("value a updated", taskInstance.getVariable("a") );
assertEquals("value b updated", taskInstance.getVariable("b") );
}