I test your solution and…
1) I must use HashMap<String, Object> processVariables = new HashMap<String,Object>();
because if i use Map<String, Object> processVariables = new HashMap<String,Object>() i have this error:
" Type mismatch: cannot convert from HashMap<String,Object> to Iterators.Map<String,Object> "
2) I have a problem on ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("wf1", processVariables) :
" runtimeService cannot be resolved "
infact eclipse with ctrl+space give me RuntimeService (interface of org.activi.engine)
but if I use
ProcessInstance processInstance = RuntimeService.startProcessInstanceByKey("wf1", processVariables)
eclipse said
The method startProcessInstanceByKey(String, String) in the type RuntimeService is not applicable for the arguments (String, Iterators.Map<String,Object>)