ProcessInstance processInstance = new ProcessInstance(processDefinition);
processInstance.signal();
Token tokenA = processInstance.findToken("/a");
Token tokenB = processInstance.findToken("/b");
ContextInstance contextInstance = processInstance.getContextInstance();
contextInstance.setVariable("r", "rrrrrr");
contextInstance.createVariable("a", "aaaaaa", tokenA);
contextInstance.createVariable("b", "bbbbbb", tokenB);
processInstance = saveAndReload(processInstance);
graphSession.deleteProcessInstance(processInstance);