Element taskElem = elem.getChild("task");
if (taskElem != null)
taskId = taskElem.getText();
TaskStub stub = new TaskStub(stubId, taskId);
//parse inputs and outputs:
Element inputElem = elem.getChild("inputs");
if (inputElem != null) {
JDOMSerializer inputSerializer = taskSerializerFactory
.getTaskSerializerSet(taskId)
.getInputParameterSerializer(config);
Map inputs = (Map)inputSerializer.read(inputElem);
stub.setInputs(inputs);
}
Element outputElem = elem.getChild("outputs");
if (outputElem != null) {
JDOMSerializer outputSerializer = taskSerializerFactory
.getTaskSerializerSet(taskId)
.getOutputParameterSerializer(config);
Map outputs = (Map)outputSerializer.read(outputElem);
stub.setOutputs(outputs);
}
return stub;
}