Skip to main content
Solved

Issue:submitSyncJob with changes in Parameters

  • January 8, 2018
  • 2 replies
  • 17 views

Forum|alt.badge.img

Hi

After changing the params using 

params += elem[i].name + "=" + elem[i].value + "&";

params = params.substr(0, params.length-1);

 I am unable to submit a job through FMEServer.submitSyncJob(repository, workspace, params, callback) function, but able to run using FMEServer.runDataDownload.

If i use the below line for params and do not change params:

params = { "publishedParameters" : [] };

then i am able to submit a job.

What is the probable reason for this behavior?

Best answer by takashi

Hi @dheeraj, because the FMEServer.submitSyncJob requires to receive parameters as a JSON object with this schema.

{ "publishedParameters" : [ { "name" : name, "value" : value }, { "name" : name, "value" : [ array_of_values ] }, ... ] }

See the JavaScript Library for FME Server Documentation to learn more.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • Best Answer
  • January 8, 2018

Hi @dheeraj, because the FMEServer.submitSyncJob requires to receive parameters as a JSON object with this schema.

{ "publishedParameters" : [ { "name" : name, "value" : value }, { "name" : name, "value" : [ array_of_values ] }, ... ] }

See the JavaScript Library for FME Server Documentation to learn more.


Forum|alt.badge.img
  • Author
  • January 8, 2018

Hi @dheeraj, because the FMEServer.submitSyncJob requires to receive parameters as a JSON object with this schema.

{ "publishedParameters" : [ { "name" : name, "value" : value }, { "name" : name, "value" : [ array_of_values ] }, ... ] }

See the JavaScript Library for FME Server Documentation to learn more.

Thanks Takashi..I was not aware of that.