Skip to main content

Hi folks,

I'm having 2 issues with my FME Server and the running workspaces.

1) The session created just like documented here https://playground.fmeserver.com/javascript/server-uploads/upload-file-in-session/ doesn't give me a session like a random number but as the username the token is connected to. What am I doing wrong? Or did I miss something with the token?

 

Or in other words: How can I delete the uploaded data after the workspace ran successfully so that further job submissions don't get/take the data already uploaded?!

2) One workspace in which I read a DWG-file adds quotes to the request-URL and though cannot find the uploaded data. When I strip the quotes everything works fine. How does this happen? The workspace has a FeatureReader to read the DWG to make it as an optional Reader (the parameter "Ignore Failed Readers" doesn't have effect). Why does FME Server takes it as a multiple set of files?!

 

FME Server 2018.0.1 - Build 18310 - win64

 

Cheers,

 

Maria

Hi @gpt_executer, regarding the first question, make sure that the version of FMEServer.js library is v3.


Hi @gpt_executer, regarding the first question, make sure that the version of FMEServer.js library is v3.

Great! That workedfor #1.

But now I'm getting the error:

This was already discussed here https://knowledge.safe.com/questions/87155/a-callback-function-must-be-defined-in-order-to-us.html (@SiennaAtSafe @linasster)

My function looks like this:

and this:

So I'm having a callback function, right?!


Hi @gpt_executer, regarding the first question, make sure that the version of FMEServer.js library is v3.

I'm afraid that Safe's example is wrong. I think the signature of the function should be:

FMEServer.runWorkspaceWithData(repository, workspace, params, callback)

See the source code of FMEServer.js v3.

http://api.fmeserver.com/js/v3/FMEServer.js

Hi @jlutherthomas, could you please check if the source of this example is correct?

https://playground.fmeserver.com/javascript/server-uploads/upload-file-in-session/


I'm afraid that Safe's example is wrong. I think the signature of the function should be:

FMEServer.runWorkspaceWithData(repository, workspace, params, callback)

See the source code of FMEServer.js v3.

http://api.fmeserver.com/js/v3/FMEServer.js

Hi @jlutherthomas, could you please check if the source of this example is correct?

https://playground.fmeserver.com/javascript/server-uploads/upload-file-in-session/

Thanks @takashi! Looks like we missed that when we updated to v3 of the FME Server javascript api. The playground code is still using the old version of the runWorkspaceWithData call. We'll fix that.


I'm afraid that Safe's example is wrong. I think the signature of the function should be:

FMEServer.runWorkspaceWithData(repository, workspace, params, callback)

See the source code of FMEServer.js v3.

http://api.fmeserver.com/js/v3/FMEServer.js

Hi @jlutherthomas, could you please check if the source of this example is correct?

https://playground.fmeserver.com/javascript/server-uploads/upload-file-in-session/

Thanks @LauraAtSafe. Also, signature of the function described in this page should be fixed too.

https://playground.fmeserver.com/javascript/javascript-library/server-documentation/


Thanks @LauraAtSafe. Also, signature of the function described in this page should be fixed too.

https://playground.fmeserver.com/javascript/javascript-library/server-documentation/

Thanks! Looks like I updated what's in the dropdown on that, but missed the outer part.


Reply