Skip to main content
Question

FME Server issues (session and uploaded data)

  • February 28, 2019
  • 6 replies
  • 13 views

gpt_geoinfo
Contributor
Forum|alt.badge.img+2

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

6 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • February 28, 2019

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


gpt_geoinfo
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 28, 2019
takashi wrote:

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?!


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • February 28, 2019
takashi wrote:

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/


laurawatsafe
Safer
Forum|alt.badge.img+11
takashi wrote:

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.


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • February 28, 2019
takashi wrote:

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/


laurawatsafe
Safer
Forum|alt.badge.img+11
takashi wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings