}
@SuppressWarnings("unchecked")
public void setProcessVariablesByElementList(List<Element> processVariableElementList) {
if (processVariableElementList != null) {
for (Element processVariableElement : processVariableElementList) {
ProcessVariable pv = new ProcessVariable();
String key = processVariableElement.getChildText("key", WORKFLOW_NAMESPACE);
List<Element> valueElementList = processVariableElement.getChildren("value", WORKFLOW_NAMESPACE);
if (valueElementList.size() == 1) {
String value = processVariableElement.getChildText("value", WORKFLOW_NAMESPACE);
pv.addValue(value);
} else {
for (Element valueElement : valueElementList) {
String value = valueElement.getText();
pv.addValue(value);
}
}
pv.setName(key);
if (pv.getValues().size() > 0)
this.addProcessVariable(pv);
}
}
}