return ELEMENT_TASK_SCRIPT;
}
@Override
protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception {
ScriptTask scriptTask = new ScriptTask();
BpmnXMLUtil.addXMLLocation(scriptTask, xtr);
scriptTask.setScriptFormat(xtr.getAttributeValue(null, ATTRIBUTE_TASK_SCRIPT_FORMAT));
scriptTask.setResultVariable(xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_SCRIPT_RESULTVARIABLE));
if (StringUtils.isEmpty(scriptTask.getResultVariable())) {
scriptTask.setResultVariable(xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_SERVICE_RESULTVARIABLE));
}
String autoStoreVariables = xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_SCRIPT_AUTO_STORE_VARIABLE);
if (StringUtils.isNotEmpty(autoStoreVariables)) {
scriptTask.setAutoStoreVariables(Boolean.valueOf(autoStoreVariables));
}
parseChildElements(getXMLElementName(), scriptTask, childParserMap, model, xtr);
return scriptTask;
}