var CHECK_HOST = false;\r
\r
var uuid = logData[2];\r
- var host = "charlie";// logData[1];\r
+ var host = logData[1];\r
\r
\r
// 1. Check that both associated views are here\r
}\r
\r
// 3. Call service to load execution message\r
- if(!window.xmlExecStub || !window.xmlExecStub[uuid]){\r
- throw new Error("Cannot find window.xmlExecStub['"+uuid+"']");\r
- return;\r
- }\r
- var xmlDoc = window.xmlExecStub[uuid];\r
- \r
- // 4. Now send all realized flows to the batch\r
- var realizedFlows = org.argeo.ria.util.Element.selectNodes(xmlDoc, "slc:slc-execution/realized-flows/slc:realized-flow");\r
- for(var i=0;i<realizedFlows.length;i++){\r
- var newEntrySpec = new org.argeo.slc.ria.execution.BatchEntrySpec(null, null, realizedFlows[i]); \r
- batchView.appendBatchEntrySpec(newEntrySpec);\r
- }\r
+ var req = org.argeo.slc.ria.SlcApi.getSlcExecutionService(uuid);\r
+ var handler = function(xmlDoc){ \r
+ var realizedFlows = org.argeo.ria.util.Element.selectNodes(xmlDoc, "slc:slc-execution/slc:realized-flows/slc:realized-flow");\r
+ for(var i=0;i<realizedFlows.length;i++){ \r
+ var newEntrySpec = new org.argeo.slc.ria.execution.BatchEntrySpec(null, null, realizedFlows[i]);\r
+ batchView.appendBatchEntrySpec(newEntrySpec);\r
+ } \r
+ };\r
+ req.addListener("completed", function(response){ \r
+ handler(response.getContent());\r
+ });\r
+ // STUB CASE\r
+ req.addListener("failed", function(){\r
+ if(!window.xmlExecStub || !window.xmlExecStub[uuid]){ \r
+ return;\r
+ }\r
+ var xmlDoc = window.xmlExecStub[uuid];\r
+ handler(xmlDoc);\r
+ }); \r
+ req.send();\r
},\r
\r
/**\r
}\r
});\r
var selectionModel = this.logPane.getSelectionModel();\r
- selectionModel.addListener("changeSelection", function(e){\r
- var viewSelection = this.getViewSelection();\r
- viewSelection.setViewId("logger");\r
- viewSelection.clear();\r
- selectionModel.iterateSelection(function(index){\r
+ selectionModel.addListener("changeSelection", function(e){ \r
+ var viewSelection = this.getViewSelection(); \r
+ viewSelection.setViewId("logger"); \r
+ viewSelection.clear(); \r
+ selectionModel.iterateSelection(function(index){ \r
viewSelection.addNode(this.logModel.getRowData(index));\r
}, this);\r
}, this);\r