Skip to content

Commit 5a17069

Browse files
committed
Merge pull request safesoftware#10 from safesoftware/feature/addDataStreaming
Added function for running through Data Streaming
2 parents 01ee4fa + e54156d commit 5a17069

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎v1.1/FMEServer.js‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,20 @@ var FMEServer = ( function() {
334334
ajax(url, callback, 'POST', params, 'application/x-www-form-urlencoded');
335335
},
336336

337+
/**
338+
* Runs a workspace using the Data Streaming service and returns the workspace output
339+
* @param {String} repository - The repository on the FME Server
340+
* @param {String} workspace - The name of the workspace on FME Server, i.e. workspace.fmw
341+
* @param {String} params - Any workspace-specific parameter values
342+
* @param {Function} callback - Callback function accepting the workspace return value
343+
*/
344+
runDataStreaming : function(repository, workspace, params, callback){
345+
callback = callback || null;
346+
var url = buildURL('{{svr}}/fmedatastreaming/' + repository + '/' + workspace);
347+
params = 'opt_showresult=true&' + params;
348+
ajax(url, callback, 'POST', params, 'application/x-www-form-urlencoded');
349+
},
350+
337351
/**
338352
* Upload file(s) using data upload legacy service
339353
* @param {String} repository - The repository on the FME Server

0 commit comments

Comments
 (0)