public String createComponent(SvgBaseTo svgTo) {
String result = null;
try {
SvgTaskTo taskTo = (SvgTaskTo)svgTo;
InputStream in = SvgBench.class.getResourceAsStream(comPath);
Document doc = XmlUtil.read(in);
String str = doc.getRootElement().asXML();
String taskBus = none;
String taskScr = none;
String taskUsr = none;
String taskSev = none;
String taskMeu = none;
String taskSed = none;
String taskRec = none;
String loopStd = none;
String loopPar = none;
String loopSeq = none;
str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(taskTo.getX()-2));
str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(taskTo.getY()-2));
str = FlowSvgUtil.replaceAll(str, id, taskTo.getId());
str = FlowSvgUtil.replaceAll(str, text, taskTo.getLabel());
str = FlowSvgUtil.replaceAll(str, text_x, StringUtil.getString(taskTo.getWidth()/2));
str = FlowSvgUtil.replaceAll(str, text_y, StringUtil.getString(taskTo.getHeight()/2));
str = FlowSvgUtil.replaceAll(str, width, StringUtil.getString(taskTo.getWidth()));
str = FlowSvgUtil.replaceAll(str, hight, StringUtil.getString(taskTo.getHeight()));
str = FlowSvgUtil.replaceAll(str, loop_x, StringUtil.getString(taskTo.getWidth()/2-48));
str = FlowSvgUtil.replaceAll(str, loop_y, StringUtil.getString(taskTo.getHeight()-80));
if(taskTo.getTaskType().equals(TaskType.BusinessRuleTask)){
taskBus = "";
}else if(taskTo.getTaskType().equals(TaskType.ScriptTask)){
taskScr = "";
}else if(taskTo.getTaskType().equals(TaskType.UserTask)){
taskUsr = "";
}else if(taskTo.getTaskType().equals(TaskType.ServiceTask)){
taskSev = "";
}else if(taskTo.getTaskType().equals(TaskType.ManualTask)){
taskMeu = "";
}else if(taskTo.getTaskType().equals(TaskType.SendTask)){
taskSed = "";
}else if(taskTo.getTaskType().equals(TaskType.ReceiveTask)){
taskRec = "";
}
if(taskTo.getLoopType().equals(LoopType.StandardLoop)){
loopStd = "";
}else if(taskTo.getLoopType().equals(LoopType.MultiInstanceLoopParallel)){
loopPar = "";
}else if(taskTo.getLoopType().equals(LoopType.MultiInstanceLoopSequential)){
loopSeq = "";
}
str = FlowSvgUtil.replaceAll(str, task_bus, taskBus);
str = FlowSvgUtil.replaceAll(str, task_scr, taskScr);