Getting back to my little project started here after a brief hiatus...
I am having trouble making a file uploaded to the 'Resources' folder using the Javascript API the input for a workbench.
Using ...
FMEServer.dataUpload( repository, workspace, fileObject, session, callback);
I can get the file to be uploaded to here:
$(FME_SHAREDRESOURCE_TEMP)/upload/MyFolder/MyWorkspace.fmw/
Now, I want to use:
FMEServer.runWorkspaceWithData( repository, workspace, params, callback)
to process the uploaded file but all attempt to feed in the correct 'params' is failing. The workspace is still going back to the default parameters that it was published with.
Currently, I'm trying this:
var params = {
{ "publishedParameters" : [{ "name" : 'SourceDataset_CSV2', "value" : <resourceFolderPath+inputFileName >},
{ "name" : 'DestDataset_JSON', "value" : < ?????>}],
"service" : "fmedatastreaming"
};
Not sure what to put for the destination value that I'm trying to capture. Javascript API documentation shows something like this and I have tried it as well:
params = { filename : workspace_file_parameter_name,
files : files_object,
params : name_value_pair_string,
service : service_name }
I feel like I'm not seeing the forest for the trees. If you have an example of how you would accomplish this, I'd love to see it.
- Upload a file to resources => Working
- Reference that uploaded file as input for Source published parameter when running workspace.
Thanks.