return null;
}
}
private WorkflowContextHeaderBuilder parseContextHeader(OMElement workflowContext, Map<String, String> configuration) throws XMLStreamException {
ContextHeaderDocument parse = null;
try {
parse = ContextHeaderDocument.Factory.parse(workflowContext.toStringWithConsume());
String msgBox = parse.getContextHeader().getWorkflowMonitoringContext().getMsgBoxEpr();
if(msgBox == null || "".equals(msgBox)){
msgBox = getAiravataAPI().getAiravataManager().getMessageBoxServiceURL().toASCIIString();
}
String msgBroker = parse.getContextHeader().getWorkflowMonitoringContext().getEventPublishEpr();
if(msgBroker == null || "".equals(msgBroker)){
msgBroker = getAiravataAPI().getAiravataManager().getEventingServiceURL().toASCIIString();
}
String gfac = parse.getContextHeader().getSoaServiceEprs().getGfacUrl();
// if(gfac == null || "".equals(gfac)){
// gfac = getAiravataAPI().getAiravataManager().getGFaCURLs().get(0).toString();
// }
configuration.put(BROKER, msgBroker);
configuration.put(GFAC, gfac);
configuration.put(MSGBOX, msgBox);
} catch (XmlException e) {
log.error(e.getMessage());
} catch (AiravataAPIInvocationException e) {
log.error(e.getMessage());
}
return new WorkflowContextHeaderBuilder(parse.getContextHeader());
}