this.engine = engine;
this.id = id;
log().t("instance",id,workflow.getName(),variables);
processInstance = new ProcessInstance(workflow.getProcessDefinition());
ContextInstance contextInstance = processInstance.getContextInstance();
if (variables != null) contextInstance.setVariables(variables);
contextInstance.setProcessInstance(processInstance);
// contextInstance.setVariable(JBpmContext.VAR_ENGINE, engine.getBpm());
contextInstance.setVariable(JBpmContext.VAR_INSTANCE_ID,id);
myContext = new JBpmContext(getBpm(),contextInstance);
}