What version FME server? This changed in 2018.
I've currently coded my script to use the FME JobSubmitter Service to call the workbench but I'm willing to switch this to run through Rest API instead. What ever will let me specify the Job Queue for Workbench.
https://docs.safe.com/fme/html/FME_Server_Documentation/ReferenceManual/job_submitter_service.htm
Are you using transformations/submit/irepository]/yworkspace]?
I can see how you submit it as a request body, using a TM directive, specifying TMDirective:
  "TMDirectives": {
    "tag": "queuename"
  },
...but I'm not sure if you can put that into a URL.Â
The other way of doing it would be to assign the repository to a particular queue. That way any job that is run from that repository will use its own default queue.
Does that help in any way?
Are you using transformations/submit/irepository]/yworkspace]?
I can see how you submit it as a request body, using a TM directive, specifying TMDirective:
  "TMDirectives": {
    "tag": "queuename"
  },
...but I'm not sure if you can put that into a URL.Â
The other way of doing it would be to assign the repository to a particular queue. That way any job that is run from that repository will use its own default queue.
Does that help in any way?
You could assign the repository to a queue using a plain URL though, so if a two-step process works:
1: Assign the repository to the required queue
2: Submit the job from that repository
Optional: 3: Reassign the repository back to its original queue]
Assigning and reassigning isn't going to work because I might have jobs calling the URL for running this job within seconds of each, each for different queue name. We have specific FME servers tasked with different queue names. Each will be running the identical workspace, but with different parameters. However I need to start these workspace(s) from an external script that will tell it which FME server needs to run.
I will try using the transformations/submit/[repository]/[workspace]. That will let me get what I need for queuename and I can still use a FME token to call this remotely through an external script.
Hi @ssmith_ftr​ ,
Â
In order to assign a queue to a job that is being run either via a Webhook (e.g. a URL for one of the transformation services such as fmejobsubmitter) or via the REST API (e.g. using the transformations endpoint), you can make use of Job Directives to assign values to those parameters you'd usually find under the 'Advanced' section on the Run Workspace page.
Â
In particular, you'll need to use the tm_tag directive to assign a queue.Â
Â
In older versions of FME (prior to 2018) we referred to 'queues' as 'tags' and since this was an exposed endpoint in our REST API the name of this directive had to remain the same for backwards compatibility.
Â
To make use of Job Directives in a Webhook you can specify them in the query string e.g.Â
Â
https://<hostname>/fmejobsubmitter/Samples/austinApartments.fmw?tm_tag=<QUEUENAME>
Â
Alternatively, as Mark mentioned if you were running the job via a REST API request you'd need to specify this as part of the upload body as JSON e.g.Â
Â
"TMDirectives": { "tag": "<QUEUENAME>" }
Â
For the REST API route, you can check out the documentation for a full example of what the upload body would look like for one of our Sample workspaces.
Â
As well as queue assignment, job directives include parameters for the Queued Job Expiry Time, Running Job Expiry Time and Run Until Cancelled advanced settings.